Package org.apache.camel.spi
Interface ExchangeFactoryManager
- All Superinterfaces:
AutoCloseable
,Service
,StaticService
Manages
ExchangeFactory
.-
Method Summary
Modifier and TypeMethodDescriptionvoid
addExchangeFactory
(ExchangeFactory exchangeFactory) Adds theExchangeFactory
to be managed.int
The capacity the pool (for each consumer) uses for storing exchanges.int
Number of consumers currently being managedReturns a read-only view of the managed factories.int
Number of currently exchanges being pooled (if pooled is in use)Aggregated statistics for all the managed exchange factoriesboolean
Whether statistics is enabled.void
purge()
Purges the internal caches (if pooled)void
removeExchangeFactory
(ExchangeFactory exchangeFactory) Removes theExchangeFactory
from being managed (such as when a route is stopped/removed) or during shutdown.void
Reset the statisticsvoid
setStatisticsEnabled
(boolean statisticsEnabled) Whether statistics is enabled.
-
Method Details
-
addExchangeFactory
Adds theExchangeFactory
to be managed.- Parameters:
exchangeFactory
- the exchange factory
-
removeExchangeFactory
Removes theExchangeFactory
from 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
-