public void Handle(TimerMessage.Schedule message) { if (!_hasTimedOut && message.ReplyMessage as IODispatcherDelayedMessage != null) { _hasTimedOut = true; message.Reply(); } }
public void Handle(TimerMessage.Schedule message) { var delay = message.ReplyMessage as IODispatcherDelayedMessage; if (delay != null && delay.MessageCorrelationId == _timeoutCorrelationId) { message.Reply(); } }
public void Handle(TimerMessage.Schedule message) { if (!_hasTimerTimedOut) { var delay = message.ReplyMessage as IODispatcherDelayedMessage; if (delay != null) { _timedOutCorrelationId = delay.MessageCorrelationId.Value; _hasTimerTimedOut = true; message.Reply(); } } }
public RequestForwardingService(IPublisher bus, MessageForwardingProxy forwardingProxy, TimeSpan tickInterval) { Ensure.NotNull(bus, "bus"); Ensure.NotNull(forwardingProxy, "forwardingProxy"); Ensure.Nonnegative(tickInterval.Milliseconds, "tickInterval"); _bus = bus; _forwardingProxy = forwardingProxy; _tickScheduleMessage = TimerMessage.Schedule.Create(tickInterval, new PublishEnvelope(bus, crossThread: true), new SystemMessage.RequestForwardingTimerTick()); }
public RequestManagementService(IPublisher bus, TimeSpan prepareTimeout, TimeSpan commitTimeout) { Ensure.NotNull(bus, "bus"); _bus = bus; _tickRequestMessage = TimerMessage.Schedule.Create(TimeSpan.FromMilliseconds(1000), new PublishEnvelope(bus), new StorageMessage.RequestManagerTimerTick()); _prepareTimeout = prepareTimeout; _commitTimeout = commitTimeout; _commitSource = new CommitSource(); }
public RequestManagementService(IPublisher bus, int prepareCount, int commitCount, TimeSpan prepareTimeout, TimeSpan commitTimeout) { Ensure.NotNull(bus, "bus"); Ensure.Nonnegative(prepareCount, "prepareCount"); Ensure.Nonnegative(commitCount, "commitCount"); _bus = bus; _tickRequestMessage = TimerMessage.Schedule.Create(TimeSpan.FromMilliseconds(1000), new PublishEnvelope(bus), new StorageMessage.RequestManagerTimerTick()); _prepareCount = prepareCount; _commitCount = commitCount; _prepareTimeout = prepareTimeout; _commitTimeout = commitTimeout; }
internal PersistentSubscriptionService(IQueuedHandler queuedHandler, IReadIndex readIndex, IODispatcher ioDispatcher, IPublisher bus, PersistentSubscriptionConsumerStrategyRegistry consumerStrategyRegistry) { Ensure.NotNull(queuedHandler, "queuedHandler"); Ensure.NotNull(readIndex, "readIndex"); Ensure.NotNull(ioDispatcher, "ioDispatcher"); _queuedHandler = queuedHandler; _readIndex = readIndex; _ioDispatcher = ioDispatcher; _bus = bus; _consumerStrategyRegistry = consumerStrategyRegistry; _checkpointReader = new PersistentSubscriptionCheckpointReader(_ioDispatcher); _streamReader = new PersistentSubscriptionStreamReader(_ioDispatcher, 100); //TODO CC configurable _tickRequestMessage = TimerMessage.Schedule.Create(TimeSpan.FromMilliseconds(1000), new PublishEnvelope(_bus), new SubscriptionMessage.PersistentSubscriptionTimerTick()); }
public InternalSchedule(TimerMessage.Schedule message, DateTime scheduled) { Message = message; Scheduled = scheduled; }
public virtual void Handle(TimerMessage.Schedule message) { _timeoutMessage = message; }