public OldestNonAckedMessageUpdaterPeriodicAction(IBus bus, IPeerStateRepository peerStateRepository, PersistenceCqlDataContext dataContext, ICqlPersistenceConfiguration configuration) : base(bus, configuration.OldestMessagePerPeerCheckPeriod) { _peerStateRepository = peerStateRepository; _dataContext = dataContext; _configuration = configuration; }
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()); }
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)); }
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()); }
public PeerStateRepository(PersistenceCqlDataContext dataContext) { _dataContext = dataContext; }