public class AggregatingMessageChannelMetrics extends DefaultMessageChannelMetrics
MessageChannelMetrics that aggregates the total response
time over a sample, to avoid fetching the system time twice for every message.| Modifier and Type | Class and Description |
|---|---|
protected static class |
AggregatingMessageChannelMetrics.AggregatingChannelMetricsContext |
DefaultMessageChannelMetrics.DefaultChannelMetricsContextDEFAULT_MOVING_AVERAGE_WINDOW, ONE_MINUTE_SECONDS, ONE_SECOND_SECONDS, receiveCount, receiveErrorCount, sendCount, sendDuration, sendErrorCount, sendErrorRate, sendRate, sendSuccessRatiologger, name| Constructor and Description |
|---|
AggregatingMessageChannelMetrics() |
AggregatingMessageChannelMetrics(String name,
ExponentialMovingAverage sendDuration,
ExponentialMovingAverageRate sendErrorRate,
ExponentialMovingAverageRatio sendSuccessRatio,
ExponentialMovingAverageRate sendRate,
int sampleSize)
Construct an instance with the supplied metrics.
|
AggregatingMessageChannelMetrics(String name,
int sampleSize)
Construct an instance with default metrics with
window=10, period=1 second,
lapsePeriod=1 minute. |
| Modifier and Type | Method and Description |
|---|---|
void |
afterSend(MetricsContext context,
boolean result)
End a send event.
|
MetricsContext |
beforeSend()
Begin a send event.
|
afterError, afterReceive, destroy, getErrorRate, getMaxSendDuration, getMeanErrorRate, getMeanErrorRatio, getMeanSendDuration, getMeanSendRate, getMinSendDuration, getReceiveCount, getReceiveCountLong, getReceiveErrorCount, getReceiveErrorCountLong, getSendCount, getSendCountLong, getSendDuration, getSendErrorCount, getSendErrorCountLong, getSendRate, getStandardDeviationSendDuration, getTimeSinceLastSend, reset, toStringisFullStatsEnabled, setFullStatsEnabledpublic AggregatingMessageChannelMetrics()
public AggregatingMessageChannelMetrics(String name, int sampleSize)
window=10, period=1 second,
lapsePeriod=1 minute.name - the name.sampleSize - the sample size over which to aggregate the duration.public AggregatingMessageChannelMetrics(String name, ExponentialMovingAverage sendDuration, ExponentialMovingAverageRate sendErrorRate, ExponentialMovingAverageRatio sendSuccessRatio, ExponentialMovingAverageRate sendRate, int sampleSize)
factor=1000000. and the the other arguments
must be created with the millis constructor argument set to true.name - the name.sendDuration - an ExponentialMovingAverage for calculating the send duration.sendErrorRate - an ExponentialMovingAverageRate for calculating the send error rate.sendSuccessRatio - an ExponentialMovingAverageRatio for calculating the success ratio.sendRate - an ExponentialMovingAverageRate for calculating the send rate.sampleSize - the sample size over which to aggregate the duration.public MetricsContext beforeSend()
AbstractMessageChannelMetricsbeforeSend in class DefaultMessageChannelMetricsAbstractMessageChannelMetrics.afterSend(MetricsContext, boolean)
call.public void afterSend(MetricsContext context, boolean result)
AbstractMessageChannelMetricsAbstractMessageChannelMetrics.beforeSend() call.afterSend in class DefaultMessageChannelMetricscontext - the context.result - true for success, false otherwise.