예제 #1
0
        /// <summary>
        /// Initializes a new instance of the type
        /// </summary>
        /// <param name="messageInterval">The number of messages to process between checkpoint operations</param>
        /// <param name="timeInterval">The time to wait between checkpointing</param>
        /// <param name="poisonMonitor">If a poison message monitor is not provided to test for bad messages at startup the NoopPoisonMonitor instance will be used</param>
        protected CheckpointingProcessor(ICheckpointPolicy checkpointPolicy, IPoisonedMonitor poisonMonitor = null)
        {
            Guard.NotNull(nameof(checkpointPolicy), checkpointPolicy);

            _checkpointPolicy = checkpointPolicy;
            _poisonMonitor    = poisonMonitor ?? NoopPoisonedMonitor.Instance;
        }
 /// <summary>
 /// Initializes a new instance of the type
 /// </summary>
 /// <param name="concurrencyPolicy">The concurrency policy the processor uses</param>
 /// <param name="poisonMonitor">If a poison message monitor is not provided to test for bad messages at startup the NoopPoisonMonitor instance will be used</param>
 public DemoProcessor(IConcurrencyPolicy concurrencyPolicy, ICheckpointPolicy checkpointPolicy, IPoisonedMonitor poisonMonitor = null) : base(checkpointPolicy, poisonMonitor)
 {
     _concurrencyPolicy = concurrencyPolicy;
 }
예제 #3
0
 /// <summary>
 /// Initializes a new instance of the type
 /// </summary>
 /// <param name="messageInterval">The number of messages to process between checkpoint operations</param>
 /// <param name="timeInterval">The time to wait between checkpointing</param>
 /// <param name="poisonMonitor">If a poison message monitor is not provided to test for bad messages at startup the NoopPoisonMonitor instance will be used</param>
 protected CheckpointingProcessor(int messageInterval, TimeSpan timeInterval, IPoisonedMonitor poisonMonitor = null) : this(new PeriodicCheckpointPolicy(messageInterval, timeInterval), poisonMonitor)
 {
 }
 /// <summary>
 /// Initializes a new instance of the type
 /// </summary>
 /// <param name="concurrencyPolicy">The concurrency policy the processor uses</param>
 /// <param name="messageInterval">The number of messages to process between checkpoint operations</param>
 /// <param name="timeInterval">The time to wait between checkpointing</param>
 /// <param name="poisonMonitor">If a poison message monitor is not provided to test for bad messages at startup the NoopPoisonMonitor instance will be used</param>
 public DemoProcessor(IConcurrencyPolicy concurrencyPolicy, int messageInterval, TimeSpan timeInterval, IPoisonedMonitor poisonMonitor = null) : base(messageInterval, timeInterval, poisonMonitor)
 {
     _concurrencyPolicy = concurrencyPolicy;
 }