Class MetricsRoutePolicyFactory
java.lang.Object
org.apache.camel.component.metrics.routepolicy.MetricsRoutePolicyFactory
- All Implemented Interfaces:
org.apache.camel.spi.RoutePolicyFactory
public class MetricsRoutePolicyFactory
extends Object
implements org.apache.camel.spi.RoutePolicyFactory
A
RoutePolicyFactory to plugin and use metrics for gathering route utilization
statistics-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.camel.spi.RoutePolicycreateRoutePolicy(org.apache.camel.CamelContext camelContext, String routeId, org.apache.camel.NamedNode routeDefinition) com.codahale.metrics.MetricRegistrybooleanbooleanisUseJmx()voidsetDurationUnit(TimeUnit durationUnit) Sets the time unit to use for timing the duration of processing a message in the routevoidsetJmxDomain(String jmxDomain) The JMX domain name to use for the enlisted JMX MBeans.voidsetMetricsRegistry(com.codahale.metrics.MetricRegistry metricsRegistry) To use a specificMetricRegistryinstance.voidsetNamePattern(String namePattern) voidsetPrettyPrint(boolean prettyPrint) Whether to use pretty print when outputting JSonvoidsetRateUnit(TimeUnit rateUnit) Sets the time unit to use for requests per unit (eg requests per second)voidsetUseJmx(boolean useJmx) Whether to use JMX reported to enlist JMX MBeans with the metrics statistics.
-
Constructor Details
-
MetricsRoutePolicyFactory
public MetricsRoutePolicyFactory()
-
-
Method Details
-
setMetricsRegistry
public void setMetricsRegistry(com.codahale.metrics.MetricRegistry metricsRegistry) To use a specificMetricRegistryinstance. If no instance has been configured, then Camel will create a shared instance to be used. -
getMetricsRegistry
public com.codahale.metrics.MetricRegistry getMetricsRegistry() -
isUseJmx
public boolean isUseJmx() -
setUseJmx
public void setUseJmx(boolean useJmx) Whether to use JMX reported to enlist JMX MBeans with the metrics statistics. -
getJmxDomain
-
setJmxDomain
The JMX domain name to use for the enlisted JMX MBeans. -
isPrettyPrint
public boolean isPrettyPrint() -
setPrettyPrint
public void setPrettyPrint(boolean prettyPrint) Whether to use pretty print when outputting JSon -
getRateUnit
-
setRateUnit
Sets the time unit to use for requests per unit (eg requests per second) -
getDurationUnit
-
setDurationUnit
Sets the time unit to use for timing the duration of processing a message in the route -
getNamePattern
-
setNamePattern
-
createRoutePolicy
public org.apache.camel.spi.RoutePolicy createRoutePolicy(org.apache.camel.CamelContext camelContext, String routeId, org.apache.camel.NamedNode routeDefinition) - Specified by:
createRoutePolicyin interfaceorg.apache.camel.spi.RoutePolicyFactory
-