Ejemplo n.º 1
0
        public StorageChaser(IPublisher masterBus, ITransactionFileChaser chaser)
        {
            Ensure.NotNull(masterBus, "masterBus");
            Ensure.NotNull(chaser, "chaser");
            _masterBus = masterBus;
            _chaser    = chaser;

            _flushDelay = 0;
            _lastFlush  = _watch.ElapsedTicks;
        }
Ejemplo n.º 2
0
        public StorageChaser(IPublisher masterBus,
                             ICheckpoint writerCheckpoint,
                             ITransactionFileChaser chaser,
                             IReadIndex readIndex,
                             IEpochManager epochManager)
        {
            Ensure.NotNull(masterBus, "masterBus");
            Ensure.NotNull(chaser, "chaser");
            Ensure.NotNull(readIndex, "readIndex");
            Ensure.NotNull(epochManager, "epochManager");

            _masterBus        = masterBus;
            _writerCheckpoint = writerCheckpoint;
            _chaser           = chaser;
            _readIndex        = readIndex;
            _epochManager     = epochManager;

            _flushDelay = 0;
            _lastFlush  = _watch.ElapsedTicks;
        }
Ejemplo n.º 3
0
        public StorageChaser(IPublisher masterBus,
                             ICheckpoint writerCheckpoint,
                             ITransactionFileChaser chaser,
                             IIndexCommitter indexCommitter,
                             IEpochManager epochManager)
        {
            Ensure.NotNull(masterBus, "masterBus");
            Ensure.NotNull(writerCheckpoint, "writerCheckpoint");
            Ensure.NotNull(chaser, "chaser");
            Ensure.NotNull(indexCommitter, "indexCommitter");
            Ensure.NotNull(epochManager, "epochManager");

            _masterBus        = masterBus;
            _writerCheckpoint = writerCheckpoint;
            _chaser           = chaser;
            _indexCommitter   = indexCommitter;
            _epochManager     = epochManager;

            _flushDelay = 0;
            _lastFlush  = _watch.ElapsedTicks;
        }
Ejemplo n.º 4
0
        public StorageChaser(IPublisher leaderBus,
                             IReadOnlyCheckpoint writerCheckpoint,
                             ITransactionFileChaser chaser,
                             IIndexCommitterService indexCommitterService,
                             IEpochManager epochManager,
                             QueueStatsManager queueStatsManager)
        {
            Ensure.NotNull(leaderBus, "leaderBus");
            Ensure.NotNull(writerCheckpoint, "writerCheckpoint");
            Ensure.NotNull(chaser, "chaser");
            Ensure.NotNull(indexCommitterService, "indexCommitterService");
            Ensure.NotNull(epochManager, "epochManager");

            _leaderBus             = leaderBus;
            _writerCheckpoint      = writerCheckpoint;
            _chaser                = chaser;
            _indexCommitterService = indexCommitterService;
            _epochManager          = epochManager;
            _queueStats            = queueStatsManager.CreateQueueStatsCollector("Storage Chaser");

            _flushDelay = 0;
            _lastFlush  = _watch.ElapsedTicks;
        }