internal FileRecordSequenceHelper(SimpleFileLog log)
        {
            this.log = log;
            this.appendLock = new ReaderWriterLock();
            this.truncateFailed = false;
            this.lastRestartArea = SequenceNumber.Invalid;
            this.newBaseSeqNum = SequenceNumber.Invalid;

            Recover();
        }
Beispiel #2
0
        public FileRecordSequence(string path, FileAccess access, int size)
        {
            if (size < 0)
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(Error.ArgumentOutOfRange("size"));

            this.access = access;
            this.log = new SimpleFileLog(Path.GetFullPath(path), size);
            this.frsHelper = new FileRecordSequenceHelper(this.log);
            this.reservedBytes = 0;
        }
        internal FileRecordSequenceHelper(SimpleFileLog log)
        {
            this.log             = log;
            this.appendLock      = new ReaderWriterLock();
            this.truncateFailed  = false;
            this.lastRestartArea = SequenceNumber.Invalid;
            this.newBaseSeqNum   = SequenceNumber.Invalid;

            Recover();
        }
Beispiel #4
0
        internal FileLogRecordStream(SimpleFileLog log, SequenceNumber recordSequenceNumber)
        {
            this.log = log;
            this.recordSequenceNumber = recordSequenceNumber;
            this.stream = null;
            this.recordSize = 0;
            this.entireRecordRead = false;
            this.streamLock = new object();

            CreateMemoryStream();
        }
 internal FileLogRecordEnumerable(
     SimpleFileLog log,
     SequenceNumber start,
     LogRecordEnumeratorType logRecordEnum,
     bool enumRestartAreas)
 {
     this.log              = log;
     this.start            = start;
     this.logRecordEnum    = logRecordEnum;
     this.enumRestartAreas = enumRestartAreas;
 }
Beispiel #6
0
        internal FileLogRecordStream(SimpleFileLog log, SequenceNumber recordSequenceNumber)
        {
            this.log = log;
            this.recordSequenceNumber = recordSequenceNumber;
            this.stream           = null;
            this.recordSize       = 0;
            this.entireRecordRead = false;
            this.streamLock       = new object();

            CreateMemoryStream();
        }
        public FileRecordSequence(string path, FileAccess access, int size)
        {
            if (size < 0)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(Error.ArgumentOutOfRange("size"));
            }

            this.access        = access;
            this.log           = new SimpleFileLog(Path.GetFullPath(path), size);
            this.frsHelper     = new FileRecordSequenceHelper(this.log);
            this.reservedBytes = 0;
        }