/// <summary> /// Initializes a new instance of the <see cref="ReceiveMessageQueryDecorator" /> class. /// </summary> /// <param name="log">The log.</param> /// <param name="handler">The handler.</param> public DelayedProcessingActionDecorator(ILogger log, IDelayedProcessingAction handler) { Guard.NotNull(() => log, log); Guard.NotNull(() => handler, handler); _log = log; _handler = handler; }
/// <summary> /// Initializes a new instance of the <see cref="ReceiveMessageQueryDecorator" /> class. /// </summary> /// <param name="log">The log.</param> /// <param name="handler">The handler.</param> public DelayedProcessingActionDecorator(ILogFactory log, IDelayedProcessingAction handler) { Guard.NotNull(() => log, log); Guard.NotNull(() => handler, handler); _log = log.Create(); _handler = handler; }
/// <summary> /// Initializes a new instance of the <see cref="DelayedProcessingActionDecorator" /> class. /// </summary> /// <param name="metrics">The metrics factory.</param> /// <param name="handler">The handler.</param> /// <param name="connectionInformation">The connection information.</param> public DelayedProcessingActionDecorator(IMetrics metrics, IDelayedProcessingAction handler, IConnectionInformation connectionInformation) { Guard.NotNull(() => metrics, metrics); Guard.NotNull(() => handler, handler); var name = handler.GetType().Name; _timer = metrics.Timer($"{connectionInformation.QueueName}.{name}.RunTimer", Units.Calls); _counter = metrics.Counter($"{connectionInformation.QueueName}.{name}.RunCounter", Units.Items); _handler = handler; }
/// <inheritdoc /> /// <summary> /// Initializes a new instance of the <see cref="RedisDelayedProcessingMonitor"/> class. /// </summary> /// <param name="action">The action.</param> /// <param name="log">The log.</param> /// <param name="options">The options.</param> public RedisDelayedProcessingMonitor(IDelayedProcessingAction action, ILogger log, RedisQueueTransportOptions options) : base(Guard.NotNull(() => action, action).Run, options.DelayedProcessingConfiguration, log) { }
/// <summary> /// Initializes a new instance of the <see cref="RedisDelayedProcessingMonitor"/> class. /// </summary> /// <param name="action">The action.</param> /// <param name="log">The log.</param> /// <param name="options">The options.</param> public RedisDelayedProcessingMonitor(IDelayedProcessingAction action, ILogFactory log, RedisQueueTransportOptions options) : base(Guard.NotNull(() => action, action).Run, options.DelayedProcessingConfiguration, log) { }