/// <summary>
 /// Constructor
 /// </summary>
 /// <param name="backoffPolicy">The back off policy to use.</param>
 /// <param name="subscription">The suubscription to be processed</param>
 /// <param name="logger">The logger to use for reporting issues</param>
 protected AbstractBackoffSubscriptionProcessor(
     IAsyncBackoffPolicy backoffPolicy,
     IAsyncSubscription <T> subscription,
     ILogger <AbstractBackoffSubscriptionProcessor <T> > logger)
 {
     _backoffPolicy = backoffPolicy;
     _subscription  = subscription;
     _logger        = logger;
 }
Beispiel #2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="backoffPolicy">The back off policy to use.</param>
 /// <param name="queue">The queue to be processed</param>
 /// <param name="logger">The logger to use for reporting issues</param>
 /// <param name="dequeErrorHandler">Optional error handler for dequeue failures. This can return true / false or throw an exception</param>
 protected AbstractBackoffQueueProcessor(
     IAsyncBackoffPolicy backoffPolicy,
     IAsyncQueue <T> queue,
     ILogger <AbstractBackoffQueueProcessor <T> > logger,
     Func <Exception, Task <bool> > dequeErrorHandler = null)
 {
     _backoffPolicy     = backoffPolicy;
     _queue             = queue;
     _logger            = logger;
     _dequeErrorHandler = dequeErrorHandler;
 }
Beispiel #3
0
 protected AbstractHostableBackoffSubscriptionProcessor(IAsyncBackoffPolicy backoffPolicy, IAsyncSubscription <T> subscription) : base(backoffPolicy, subscription)
 {
 }
Beispiel #4
0
 protected AbstractHostableBackoffSubscriptionProcessor(IAsyncBackoffPolicy backoffPolicy, IAsyncSubscription <T> subscription, ILogger <AbstractBackoffSubscriptionProcessor <T> > logger) : base(backoffPolicy, subscription, logger)
 {
 }
Beispiel #5
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="backoffPolicy">The back off policy to use.</param>
 /// <param name="queue">The queue to be processed</param>
 /// <param name="dequeErrorHandler">Optional error handler for dequeue failures. This can return true / false or throw an exception</param>
 protected AbstractBackoffQueueProcessor(
     IAsyncBackoffPolicy backoffPolicy,
     IAsyncQueue <T> queue,
     Func <Exception, Task <bool> > dequeErrorHandler = null) : this(backoffPolicy, queue, null, dequeErrorHandler)
 {
 }
Beispiel #6
0
 protected AbstractHostableBackoffQueueProcessor(IAsyncBackoffPolicy backoffPolicy, IAsyncQueue <T> queue, ILogger <AbstractBackoffQueueProcessor <T> > logger, Func <Exception, Task <bool> > dequeErrorHandler = null) : base(backoffPolicy, queue, logger, dequeErrorHandler)
 {
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="backoffPolicy">The back off policy to use.</param>
 /// <param name="subscription">The subscription to be processed</param>
 protected AbstractBackoffSubscriptionProcessor(
     IAsyncBackoffPolicy backoffPolicy,
     IAsyncSubscription <T> subscription) : this(backoffPolicy, subscription, null)
 {
 }