Package org.apache.camel.spi
Interface ExchangeFactoryManager
- All Superinterfaces:
AutoCloseable,Service,StaticService
Manages
ExchangeFactory.-
Method Summary
Modifier and TypeMethodDescriptionvoidaddExchangeFactory(ExchangeFactory exchangeFactory) Adds theExchangeFactoryto be managed.intThe capacity the pool (for each consumer) uses for storing exchanges.intNumber of consumers currently being managedReturns a read-only view of the managed factories.intNumber of currently exchanges being pooled (if pooled is in use)Aggregated statistics for all the managed exchange factoriesbooleanWhether statistics is enabled.voidpurge()Purges the internal caches (if pooled)voidremoveExchangeFactory(ExchangeFactory exchangeFactory) Removes theExchangeFactoryfrom being managed (such as when a route is stopped/removed) or during shutdown.voidReset the statisticsvoidsetStatisticsEnabled(boolean statisticsEnabled) Whether statistics is enabled.
-
Method Details
-
addExchangeFactory
Adds theExchangeFactoryto be managed.- Parameters:
exchangeFactory- the exchange factory
-
removeExchangeFactory
Removes theExchangeFactoryfrom being managed (such as when a route is stopped/removed) or during shutdown.- Parameters:
exchangeFactory- the exchange factory
-
getExchangeFactories
Collection<ExchangeFactory> getExchangeFactories()Returns a read-only view of the managed factories. -
getConsumerCounter
int getConsumerCounter()Number of consumers currently being managed -
getCapacity
int getCapacity()The capacity the pool (for each consumer) uses for storing exchanges. The default capacity is 100. -
getPooledCounter
int getPooledCounter()Number of currently exchanges being pooled (if pooled is in use) -
isStatisticsEnabled
boolean isStatisticsEnabled()Whether statistics is enabled. -
setStatisticsEnabled
void setStatisticsEnabled(boolean statisticsEnabled) Whether statistics is enabled. -
resetStatistics
void resetStatistics()Reset the statistics -
purge
void purge()Purges the internal caches (if pooled) -
getStatistics
PooledObjectFactory.Statistics getStatistics()Aggregated statistics for all the managed exchange factories
-