public abstract class AbstractMessageChannelMetrics extends java.lang.Object implements ConfigurableMetrics
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.commons.logging.Log |
logger |
protected java.lang.String |
name |
| Constructor and Description |
|---|
AbstractMessageChannelMetrics(java.lang.String name)
Construct an instance with the provided name.
|
AbstractMessageChannelMetrics(java.lang.String name,
io.micrometer.core.instrument.Timer timer,
io.micrometer.core.instrument.Counter errorCounter,
io.micrometer.core.instrument.Counter receiveCounter,
io.micrometer.core.instrument.Counter receiveErrorCounter)
Construct an instance with the provided name, timer, error counter, receive counter
and receive error counter.
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
afterError() |
abstract void |
afterReceive() |
abstract void |
afterSend(MetricsContext context,
boolean result)
End a send event.
|
abstract MetricsContext |
beforeSend()
Begin a send event.
|
io.micrometer.core.instrument.Counter |
getErrorCounter()
Return the error counter if Micrometer metrics are being used.
|
abstract Statistics |
getErrorRate() |
abstract double |
getMaxSendDuration() |
abstract double |
getMeanErrorRate() |
abstract double |
getMeanErrorRatio() |
abstract double |
getMeanSendDuration() |
abstract double |
getMeanSendRate() |
abstract double |
getMinSendDuration() |
abstract int |
getReceiveCount() |
io.micrometer.core.instrument.Counter |
getReceiveCounter()
Return the receive counter if Micrometer metrics are being used.
|
abstract long |
getReceiveCountLong() |
abstract int |
getReceiveErrorCount() |
io.micrometer.core.instrument.Counter |
getReceiveErrorCounter()
Return the receive error counter if Micrometer metrics are being used.
|
abstract long |
getReceiveErrorCountLong() |
abstract int |
getSendCount() |
abstract long |
getSendCountLong() |
abstract Statistics |
getSendDuration() |
abstract int |
getSendErrorCount() |
abstract long |
getSendErrorCountLong() |
abstract Statistics |
getSendRate() |
abstract double |
getStandardDeviationSendDuration() |
io.micrometer.core.instrument.Timer |
getTimer()
Return the timer if Micrometer metrics are being used.
|
abstract double |
getTimeSinceLastSend() |
protected boolean |
isFullStatsEnabled() |
abstract void |
reset()
Reset all counters/statistics.
|
void |
setFullStatsEnabled(boolean fullStatsEnabled)
When false, simple counts are maintained; when true complete statistics
are maintained.
|
protected final org.apache.commons.logging.Log logger
protected final java.lang.String name
public AbstractMessageChannelMetrics(java.lang.String name)
name - the name.public AbstractMessageChannelMetrics(java.lang.String name,
io.micrometer.core.instrument.Timer timer,
io.micrometer.core.instrument.Counter errorCounter,
io.micrometer.core.instrument.Counter receiveCounter,
io.micrometer.core.instrument.Counter receiveErrorCounter)
name - the name.timer - the timer.errorCounter - the error counter.receiveCounter - the receive counter.receiveErrorCounter - the receive error counter.public void setFullStatsEnabled(boolean fullStatsEnabled)
fullStatsEnabled - true for complete statistics.protected boolean isFullStatsEnabled()
public abstract MetricsContext beforeSend()
afterSend(MetricsContext, boolean)
call.public abstract void afterSend(MetricsContext context, boolean result)
beforeSend() call.context - the context.result - true for success, false otherwise.public abstract void reset()
@Nullable public io.micrometer.core.instrument.Timer getTimer()
@Nullable public io.micrometer.core.instrument.Counter getErrorCounter()
@Nullable public io.micrometer.core.instrument.Counter getReceiveCounter()
@Nullable public io.micrometer.core.instrument.Counter getReceiveErrorCounter()
public abstract int getSendCount()
public abstract long getSendCountLong()
public abstract int getSendErrorCount()
public abstract long getSendErrorCountLong()
public abstract double getTimeSinceLastSend()
public abstract double getMeanSendRate()
public abstract double getMeanErrorRate()
public abstract double getMeanErrorRatio()
public abstract double getMeanSendDuration()
public abstract double getMinSendDuration()
public abstract double getMaxSendDuration()
public abstract double getStandardDeviationSendDuration()
public abstract Statistics getSendDuration()
public abstract Statistics getSendRate()
public abstract Statistics getErrorRate()
public abstract void afterReceive()
public abstract void afterError()
public abstract int getReceiveCount()
public abstract long getReceiveCountLong()
public abstract int getReceiveErrorCount()
public abstract long getReceiveErrorCountLong()