/// <summary> /// Initializes a new instance of the <see cref="QueueCreationDecorator" /> class. /// </summary> /// <param name="metrics">The metrics factory.</param> /// <param name="handler">The handler.</param> /// <param name="connectionInformation">The connection information.</param> public ResetHeartBeatDecorator(IMetrics metrics, IResetHeartBeat handler, IConnectionInformation connectionInformation) { var name = handler.GetType().Name; _timer = metrics.Timer($"{connectionInformation.QueueName}.{name}.ResetTimer", Units.Calls); _counter = metrics.Counter($"{connectionInformation.QueueName}.{name}.ResetCounter", Units.Items); _handler = handler; }
/// <summary> /// Initializes a new instance of the <see cref="ResetHeartBeatDecorator" /> class. /// </summary> /// <param name="log">The log.</param> /// <param name="handler">The handler.</param> /// <param name="configuration">The configuration.</param> public ResetHeartBeatDecorator(ILogger log, IResetHeartBeat handler, QueueConsumerConfiguration configuration) { Guard.NotNull(() => log, log); Guard.NotNull(() => handler, handler); Guard.NotNull(() => configuration, configuration); _log = log; _handler = handler; _configuration = configuration; }
/// <summary> /// Initializes a new instance of the <see cref="HeartBeatMonitor" /> class. /// </summary> /// <param name="configuration">The configuration.</param> /// <param name="resetHeartBeat">The reset heart beat module.</param> /// <param name="log">The log.</param> public HeartBeatMonitor(IHeartBeatConfiguration configuration, IResetHeartBeat resetHeartBeat, ILogFactory log): base(Guard.NotNull(() => resetHeartBeat, resetHeartBeat).Reset, configuration, log) { }
/// <summary> /// Initializes a new instance of the <see cref="HeartBeatMonitor" /> class. /// </summary> /// <param name="configuration">The configuration.</param> /// <param name="resetHeartBeat">The reset heart beat module.</param> /// <param name="log">The log.</param> public HeartBeatMonitor(IHeartBeatConfiguration configuration, IResetHeartBeat resetHeartBeat, ILogger log) : base(configuration, Guard.NotNull(() => resetHeartBeat, resetHeartBeat).Reset, log) { }
/// <summary> /// Initializes a new instance of the <see cref="ResetHeartBeatDecorator"/> class. /// </summary> /// <param name="handler">The handler.</param> /// <param name="tracer">The tracer.</param> /// <param name="headers">The headers.</param> public ResetHeartBeatDecorator(IResetHeartBeat handler, ITracer tracer, IStandardHeaders headers) { _handler = handler; _tracer = tracer; _headers = headers; }
/// <summary> /// Initializes a new instance of the <see cref="ResetHeartBeatDecorator"/> class. /// </summary> /// <param name="handler">The handler.</param> /// <param name="tracer">The tracer.</param> /// <param name="headers">The headers.</param> public ResetHeartBeatDecorator(IResetHeartBeat handler, ActivitySource tracer, IStandardHeaders headers) { _handler = handler; _tracer = tracer; _headers = headers; }