public class CompositePerformanceCounter extends Object implements PerformanceCounter
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 and Description |
|---|
CompositePerformanceCounter(PerformanceCounter counter1,
PerformanceCounter counter2) |
| Modifier and Type | Method and Description |
|---|---|
void |
completedExchange(Exchange exchange,
long time)
Executed when an
Exchange is complete. |
void |
failedExchange(Exchange exchange)
Executed when an
Exchange failed. |
boolean |
isStatisticsEnabled()
Are statistics enabled?
They can be enabled and disabled at runtime
|
void |
processExchange(Exchange exchange)
Executed when an
Exchange is about to be processed. |
void |
setStatisticsEnabled(boolean statisticsEnabled)
Sets whether statistics are enabled.
|
public CompositePerformanceCounter(PerformanceCounter counter1, PerformanceCounter counter2)
public void processExchange(Exchange exchange)
PerformanceCounterExchange is about to be processed.processExchange in interface PerformanceCounterexchange - the exchangepublic void completedExchange(Exchange exchange, long time)
PerformanceCounterExchange is complete.completedExchange in interface PerformanceCounterexchange - the exchangetime - the time it took in millis to completepublic void failedExchange(Exchange exchange)
PerformanceCounterExchange failed.failedExchange in interface PerformanceCounterexchange - the exchangepublic boolean isStatisticsEnabled()
PerformanceCounterisStatisticsEnabled in interface PerformanceCounterpublic void setStatisticsEnabled(boolean statisticsEnabled)
PerformanceCountersetStatisticsEnabled in interface PerformanceCounterstatisticsEnabled - whether statistics are enabled or notApache Camel