public interface StatisticsGatherer
StatisticsCounters
and return their attributes. This interface gives a standard way for
parts of the broker to set up and configure statistics generation.
When creating these objects, there should be a parent/child relationship between them, such that the lowest level gatherer can record statistics if enabled, and pass on the notification to the parent object to allow higher level aggregation. When resetting statistics, this works in the opposite direction, with higher level gatherers also resetting all of their children.
| Modifier and Type | Method and Description |
|---|---|
StatisticsCounter |
getDataDeliveryStatistics()
Gives access to the
StatisticsCounter that is used to count
delivered message size statistics. |
StatisticsCounter |
getDataReceiptStatistics()
Gives access to the
StatisticsCounter that is used to count
received message size statistics. |
StatisticsCounter |
getMessageDeliveryStatistics()
Gives access to the
StatisticsCounter that is used to count
delivered message statistics. |
StatisticsCounter |
getMessageReceiptStatistics()
Gives access to the
StatisticsCounter that is used to count
received message statistics. |
void |
registerMessageDelivered(long messageSize)
This method is responsible for registering the delivery of a message
with the counters.
|
void |
registerMessageReceived(long messageSize,
long timestamp)
This method is responsible for registering the receipt of a message
with the counters, and also for passing this notification to any parent
StatisticsGatherers. |
void |
resetStatistics()
Reset the counters for this, and any child
StatisticsGatherers. |
void registerMessageReceived(long messageSize,
long timestamp)
StatisticsGatherers. If statistics generation is not enabled,
then this method should simple delegate to the parent gatherer.messageSize - the size in bytes of the delivered messagetimestamp - the time the message was deliveredvoid registerMessageDelivered(long messageSize)
messageSize - the size in bytes of the delivered messageregisterMessageReceived(long, long)StatisticsCounter getMessageDeliveryStatistics()
StatisticsCounter that is used to count
delivered message statistics.StatisticsCounter that counts delivered messagesStatisticsCounter getMessageReceiptStatistics()
StatisticsCounter that is used to count
received message statistics.StatisticsCounter that counts received messagesStatisticsCounter getDataDeliveryStatistics()
StatisticsCounter that is used to count
delivered message size statistics.StatisticsCounter that counts delivered bytesStatisticsCounter getDataReceiptStatistics()
StatisticsCounter that is used to count
received message size statistics.StatisticsCounter that counts received bytesvoid resetStatistics()
StatisticsGatherers.Copyright © 2006–2016 The Apache Software Foundation. All rights reserved.