/// <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; }
/// <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; }
protected AbstractHostableBackoffSubscriptionProcessor(IAsyncBackoffPolicy backoffPolicy, IAsyncSubscription <T> subscription) : base(backoffPolicy, subscription) { }
protected AbstractHostableBackoffSubscriptionProcessor(IAsyncBackoffPolicy backoffPolicy, IAsyncSubscription <T> subscription, ILogger <AbstractBackoffSubscriptionProcessor <T> > logger) : base(backoffPolicy, subscription, logger) { }
/// <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) { }
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) { }