Example #1
0
        /// <summary>
        /// Initializes a new instance of the VersionManager class.
        /// </summary>
        /// <param name="versionProvider">The version provider (LoggingReplicator)</param>
        internal VersionManager(IVersionProvider versionProvider)
        {
            this.versionListLock            = new ReaderWriterLockSlim();
            this.versionProvider            = versionProvider;
            this.readerRemovalNotifications = new Dictionary <long, TaskCompletionSource <long> >();
            this.registeredNotifications    = new ConcurrentDictionary <NotificationKey, byte>();

            this.versionList            = new List <long>();
            this.lastDispatchingBarrier = null;
        }
Example #2
0
        protected LogRecord(LogRecordType recordType, ulong recordPosition, long lsn)
        {
            this.recordType = recordType;
            this.lsn        = new LogicalSequenceNumber(lsn);
            this.psn        = PhysicalSequenceNumber.InvalidPsn;
            this.previousPhysicalRecordOffset = InvalidPhysicalRecordOffset;

            this.recordPosition         = recordPosition;
            this.recordLength           = InvalidRecordLength;
            this.previousPhysicalRecord = PhysicalLogRecord.InvalidPhysicalLogRecord;
            this.flushedTask            = new CompletionTask();
            this.appliedTask            = new CompletionTask();
            this.processedTask          = new CompletionTask();

            this.ApproximateSizeOnDisk = 0;
        }
Example #3
0
        protected LogRecord(LogRecordType recordType)
        {
            this.recordType = recordType;
            this.lsn        = LogicalSequenceNumber.InvalidLsn;
            this.psn        = PhysicalSequenceNumber.InvalidPsn;
            this.previousPhysicalRecordOffset = InvalidPhysicalRecordOffset;

            this.recordLength           = InvalidRecordLength;
            this.recordPosition         = InvalidRecordPosition;
            this.previousPhysicalRecord = PhysicalLogRecord.InvalidPhysicalLogRecord;
            this.flushedTask            = new CompletionTask();
            this.appliedTask            = new CompletionTask();
            this.processedTask          = new CompletionTask();

            this.UpdateApproximateDiskSize();
        }
Example #4
0
        protected LogRecord()
        {
            this.recordType = LogRecordType.Invalid;
            this.lsn        = LogicalSequenceNumber.InvalidLsn;
            this.psn        = PhysicalSequenceNumber.InvalidPsn;
            this.previousPhysicalRecordOffset = InvalidPhysicalRecordOffset;

            this.recordPosition         = InvalidRecordPosition;
            this.recordLength           = InvalidRecordLength;
            this.previousPhysicalRecord = null;
            this.flushedTask            = this.invalidCompletionTask;
            this.appliedTask            = this.invalidCompletionTask;
            this.processedTask          = this.invalidCompletionTask;

            this.ApproximateSizeOnDisk = 0;
        }
Example #5
0
 public void UpdateDispatchingBarrierTask(CompletionTask barrierTask)
 {
     this.versionManager.UpdateDispatchingBarrierTask(barrierTask);
 }
Example #6
0
 public void UpdateDispatchingBarrierTask(CompletionTask barrierTask)
 {
     this.lastDispatchingBarrier = barrierTask;
 }