Package com.rabbitmq.client.impl
Class StandardMetricsCollector
- java.lang.Object
-
- com.rabbitmq.client.impl.AbstractMetricsCollector
-
- com.rabbitmq.client.impl.StandardMetricsCollector
-
- All Implemented Interfaces:
MetricsCollector
public class StandardMetricsCollector extends AbstractMetricsCollector
Dropwizard Metrics implementation ofMetricsCollector
. Note transactions are not supported (seeMetricsCollector
. Metrics provides out-of-the-box support for report backends like JMX, Graphite, Ganglia, or plain HTTP. See Metrics documentation for more details.- See Also:
MetricsCollector
-
-
Constructor Summary
Constructors Constructor Description StandardMetricsCollector()
StandardMetricsCollector(com.codahale.metrics.MetricRegistry metricRegistry)
StandardMetricsCollector(com.codahale.metrics.MetricRegistry registry, String metricsPrefix)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
decrementChannelCount(Channel channel)
Decrements channel count.protected void
decrementConnectionCount(Connection connection)
Decrements connection count.com.codahale.metrics.Meter
getAcknowledgedMessages()
com.codahale.metrics.Counter
getChannels()
com.codahale.metrics.Counter
getConnections()
com.codahale.metrics.Meter
getConsumedMessages()
com.codahale.metrics.MetricRegistry
getMetricRegistry()
com.codahale.metrics.Meter
getPublishedMessages()
com.codahale.metrics.Meter
getRejectedMessages()
protected void
incrementChannelCount(Channel channel)
Increments channel count.protected void
incrementConnectionCount(Connection connection)
Increments connection count.protected void
markAcknowledgedMessage()
Marks the event of an acknowledged message.protected void
markConsumedMessage()
Marks the event of a consumed message.protected void
markPublishedMessage()
Marks the event of a published message.protected void
markRejectedMessage()
Marks the event of a rejected message.-
Methods inherited from class com.rabbitmq.client.impl.AbstractMetricsCollector
basicAck, basicCancel, basicConsume, basicNack, basicPublish, basicReject, cleanStaleState, closeChannel, closeConnection, consumedMessage, consumedMessage, newChannel, newConnection
-
-
-
-
Constructor Detail
-
StandardMetricsCollector
public StandardMetricsCollector(com.codahale.metrics.MetricRegistry registry, String metricsPrefix)
-
StandardMetricsCollector
public StandardMetricsCollector()
-
StandardMetricsCollector
public StandardMetricsCollector(com.codahale.metrics.MetricRegistry metricRegistry)
-
-
Method Detail
-
incrementConnectionCount
protected void incrementConnectionCount(Connection connection)
Description copied from class:AbstractMetricsCollector
Increments connection count. The connection object is passed in as complementary information and without any guarantee of not being null.- Specified by:
incrementConnectionCount
in classAbstractMetricsCollector
- Parameters:
connection
- the connection that has been created (can be null)
-
decrementConnectionCount
protected void decrementConnectionCount(Connection connection)
Description copied from class:AbstractMetricsCollector
Decrements connection count. The connection object is passed in as complementary information and without any guarantee of not being null.- Specified by:
decrementConnectionCount
in classAbstractMetricsCollector
- Parameters:
connection
- the connection that has been closed (can be null)
-
incrementChannelCount
protected void incrementChannelCount(Channel channel)
Description copied from class:AbstractMetricsCollector
Increments channel count. The channel object is passed in as complementary information and without any guarantee of not being null.- Specified by:
incrementChannelCount
in classAbstractMetricsCollector
- Parameters:
channel
- the channel that has been created (can be null)
-
decrementChannelCount
protected void decrementChannelCount(Channel channel)
Description copied from class:AbstractMetricsCollector
Decrements channel count. The channel object is passed in as complementary information and without any guarantee of not being null.- Specified by:
decrementChannelCount
in classAbstractMetricsCollector
-
markPublishedMessage
protected void markPublishedMessage()
Description copied from class:AbstractMetricsCollector
Marks the event of a published message.- Specified by:
markPublishedMessage
in classAbstractMetricsCollector
-
markConsumedMessage
protected void markConsumedMessage()
Description copied from class:AbstractMetricsCollector
Marks the event of a consumed message.- Specified by:
markConsumedMessage
in classAbstractMetricsCollector
-
markAcknowledgedMessage
protected void markAcknowledgedMessage()
Description copied from class:AbstractMetricsCollector
Marks the event of an acknowledged message.- Specified by:
markAcknowledgedMessage
in classAbstractMetricsCollector
-
markRejectedMessage
protected void markRejectedMessage()
Description copied from class:AbstractMetricsCollector
Marks the event of a rejected message.- Specified by:
markRejectedMessage
in classAbstractMetricsCollector
-
getMetricRegistry
public com.codahale.metrics.MetricRegistry getMetricRegistry()
-
getConnections
public com.codahale.metrics.Counter getConnections()
-
getChannels
public com.codahale.metrics.Counter getChannels()
-
getPublishedMessages
public com.codahale.metrics.Meter getPublishedMessages()
-
getConsumedMessages
public com.codahale.metrics.Meter getConsumedMessages()
-
getAcknowledgedMessages
public com.codahale.metrics.Meter getAcknowledgedMessages()
-
getRejectedMessages
public com.codahale.metrics.Meter getRejectedMessages()
-
-