コード例 #1
0
 public OldestNonAckedMessageUpdaterPeriodicAction(IBus bus, IPeerStateRepository peerStateRepository, PersistenceCqlDataContext dataContext, ICqlPersistenceConfiguration configuration)
     : base(bus, configuration.OldestMessagePerPeerCheckPeriod)
 {
     _peerStateRepository = peerStateRepository;
     _dataContext         = dataContext;
     _configuration       = configuration;
 }
コード例 #2
0
ファイル: CqlStorage.cs プロジェクト: redchew-fork/Zebus
        public CqlStorage(PersistenceCqlDataContext dataContext, IPersistenceConfiguration configuration, IReporter reporter)
        {
            _dataContext         = dataContext;
            _peerStateRepository = new PeerStateRepository(dataContext);
            _configuration       = configuration;
            _reporter            = reporter;

            _preparedStatement = dataContext.Session.Prepare(dataContext.PersistentMessages.Insert(new PersistentMessage()).SetTTL(0).SetTimestamp(default(DateTimeOffset)).ToString());
        }
コード例 #3
0
        public CqlStorage(PersistenceCqlDataContext dataContext, IPeerStateRepository peerStateRepository, IPersistenceConfiguration configuration, IReporter reporter)
        {
            _dataContext         = dataContext;
            _peerStateRepository = peerStateRepository;
            _configuration       = configuration;
            _reporter            = reporter;

            _preparedStatement = dataContext.Session.Prepare(dataContext.PersistentMessages.Insert(new PersistentMessage()).SetTTL(0).SetTimestamp(default(DateTimeOffset)).ToString());
            _parallelPersistor = new ParallelPersistor(dataContext.Session, 64, ex => _log.Warn("Exception caught while trying to persist message", ex));
        }
コード例 #4
0
ファイル: CqlMessageReader.cs プロジェクト: kevinmiles/Zebus
 public CqlMessageReader(PersistenceCqlDataContext dataContext, PeerState peerState)
 {
     _dataContext       = dataContext;
     _peerState         = peerState;
     _preparedStatement = _dataContext.Session.Prepare(_dataContext.PersistentMessages
                                                       .Where(x => x.PeerId == _peerState.PeerId.ToString() &&
                                                              x.BucketId == 0 &&
                                                              x.UniqueTimestampInTicks >= 0)
                                                       .Select(x => new { x.IsAcked, x.TransportMessage })
                                                       .ToString());
 }
コード例 #5
0
 public PeerStateRepository(PersistenceCqlDataContext dataContext)
 {
     _dataContext = dataContext;
 }