Package org.apache.camel.management
Class CompositePerformanceCounter
- java.lang.Object
-
- org.apache.camel.management.CompositePerformanceCounter
-
- All Implemented Interfaces:
PerformanceCounter
public class CompositePerformanceCounter extends Object implements PerformanceCounter
A compositePerformanceCounteris 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 theManagedCamelContextcan aggregate all stats from the routes.
-
-
Constructor Summary
Constructors Constructor Description CompositePerformanceCounter(PerformanceCounter counter1, PerformanceCounter counter2)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcompletedExchange(org.apache.camel.Exchange exchange, long time)Executed when anExchangeis complete.voidfailedExchange(org.apache.camel.Exchange exchange)Executed when anExchangefailed.booleanisStatisticsEnabled()Are statistics enabled?voidprocessExchange(org.apache.camel.Exchange exchange, String type)Executed when anExchangeis about to be processed.voidsetStatisticsEnabled(boolean statisticsEnabled)Sets whether statistics are enabled.
-
-
-
Constructor Detail
-
CompositePerformanceCounter
public CompositePerformanceCounter(PerformanceCounter counter1, PerformanceCounter counter2)
-
-
Method Detail
-
processExchange
public void processExchange(org.apache.camel.Exchange exchange, String type)
Description copied from interface:PerformanceCounterExecuted when anExchangeis about to be processed.- Specified by:
processExchangein interfacePerformanceCounter- Parameters:
exchange- the exchangetype- the node type
-
completedExchange
public void completedExchange(org.apache.camel.Exchange exchange, long time)
Description copied from interface:PerformanceCounterExecuted when anExchangeis complete.- Specified by:
completedExchangein interfacePerformanceCounter- Parameters:
exchange- the exchangetime- the time it took in millis to complete
-
failedExchange
public void failedExchange(org.apache.camel.Exchange exchange)
Description copied from interface:PerformanceCounterExecuted when anExchangefailed.- Specified by:
failedExchangein interfacePerformanceCounter- Parameters:
exchange- the exchange
-
isStatisticsEnabled
public boolean isStatisticsEnabled()
Description copied from interface:PerformanceCounterAre statistics enabled? They can be enabled and disabled at runtime- Specified by:
isStatisticsEnabledin interfacePerformanceCounter- Returns:
- whether statistics are enabled or not
-
setStatisticsEnabled
public void setStatisticsEnabled(boolean statisticsEnabled)
Description copied from interface:PerformanceCounterSets whether statistics are enabled. They can be enabled and disabled at runtime- Specified by:
setStatisticsEnabledin interfacePerformanceCounter- Parameters:
statisticsEnabled- whether statistics are enabled or not
-
-