Package org.apache.camel.management
Class CompositePerformanceCounter
java.lang.Object
org.apache.camel.management.CompositePerformanceCounter
- All Implemented Interfaces:
PerformanceCounter
A composite
PerformanceCounter
is used for tracking performance statistics on both a per context and route
level, by issuing callbacks on both when an event happens.
This implementation is used so the ManagedCamelContext
can aggregate all
stats from the routes.-
Constructor Summary
ConstructorsConstructorDescriptionCompositePerformanceCounter
(PerformanceCounter counter1, PerformanceCounter counter2) -
Method Summary
Modifier and TypeMethodDescriptionvoid
completedExchange
(org.apache.camel.Exchange exchange, long time) Executed when anExchange
is complete.void
failedExchange
(org.apache.camel.Exchange exchange) Executed when anExchange
failed.boolean
Are statistics enabled?void
processExchange
(org.apache.camel.Exchange exchange, String type) Executed when anExchange
is about to be processed.void
setStatisticsEnabled
(boolean statisticsEnabled) Sets whether statistics are enabled.
-
Constructor Details
-
CompositePerformanceCounter
-
-
Method Details
-
processExchange
Description copied from interface:PerformanceCounter
Executed when anExchange
is about to be processed.- Specified by:
processExchange
in interfacePerformanceCounter
- Parameters:
exchange
- the exchangetype
- the node type
-
completedExchange
Description copied from interface:PerformanceCounter
Executed when anExchange
is complete.- Specified by:
completedExchange
in interfacePerformanceCounter
- Parameters:
exchange
- the exchangetime
- the time it took in millis to complete
-
failedExchange
Description copied from interface:PerformanceCounter
Executed when anExchange
failed.- Specified by:
failedExchange
in interfacePerformanceCounter
- Parameters:
exchange
- the exchange
-
isStatisticsEnabled
Description copied from interface:PerformanceCounter
Are statistics enabled? They can be enabled and disabled at runtime- Specified by:
isStatisticsEnabled
in interfacePerformanceCounter
- Returns:
- whether statistics are enabled or not
-
setStatisticsEnabled
Description copied from interface:PerformanceCounter
Sets whether statistics are enabled. They can be enabled and disabled at runtime- Specified by:
setStatisticsEnabled
in interfacePerformanceCounter
- Parameters:
statisticsEnabled
- whether statistics are enabled or not
-