public class DefaultConsumerCache
extends org.apache.camel.support.service.ServiceSupport
implements org.apache.camel.spi.ConsumerCache
Consumer.| Constructor and Description | 
|---|
| DefaultConsumerCache(Object source,
                    org.apache.camel.CamelContext camelContext,
                    int cacheSize) | 
| Modifier and Type | Method and Description | 
|---|---|
| org.apache.camel.PollingConsumer | acquirePollingConsumer(org.apache.camel.Endpoint endpoint)Acquires a pooled PollingConsumer which you must release back again after usage using the
  releasePollingConsumer(org.apache.camel.Endpoint, org.apache.camel.PollingConsumer)method. | 
| void | cleanUp() | 
| protected PollingConsumerServicePool | createServicePool(org.apache.camel.CamelContext camelContext,
                 int cacheSize) | 
| protected void | doInit() | 
| protected void | doShutdown() | 
| protected void | doStart() | 
| protected void | doStop() | 
| org.apache.camel.CamelContext | getCamelContext() | 
| int | getCapacity()Gets the maximum cache size (capacity). | 
| org.apache.camel.spi.EndpointUtilizationStatistics | getEndpointUtilizationStatistics() | 
| Object | getSource()Gets the source which uses this cache | 
| boolean | isExtendedStatistics() | 
| void | purge()Purges this cache | 
| org.apache.camel.Exchange | receive(org.apache.camel.Endpoint endpoint) | 
| org.apache.camel.Exchange | receive(org.apache.camel.Endpoint endpoint,
       long timeout) | 
| org.apache.camel.Exchange | receiveNoWait(org.apache.camel.Endpoint endpoint) | 
| void | releasePollingConsumer(org.apache.camel.Endpoint endpoint,
                      org.apache.camel.PollingConsumer pollingConsumer)Releases an acquired producer back after usage. | 
| void | setExtendedStatistics(boolean extendedStatistics)Whether extended JMX statistics is enabled for  EndpointUtilizationStatistics | 
| int | size()Returns the current size of the cache | 
| String | toString() | 
build, doBuild, doFail, doLifecycleChange, doResume, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic DefaultConsumerCache(Object source, org.apache.camel.CamelContext camelContext, int cacheSize)
protected PollingConsumerServicePool createServicePool(org.apache.camel.CamelContext camelContext, int cacheSize)
public boolean isExtendedStatistics()
public void setExtendedStatistics(boolean extendedStatistics)
EndpointUtilizationStatisticspublic void releasePollingConsumer(org.apache.camel.Endpoint endpoint,
                                   org.apache.camel.PollingConsumer pollingConsumer)
releasePollingConsumer in interface org.apache.camel.spi.ConsumerCacheendpoint - the endpointpollingConsumer - the pollingConsumer to releasepublic org.apache.camel.PollingConsumer acquirePollingConsumer(org.apache.camel.Endpoint endpoint)
releasePollingConsumer(org.apache.camel.Endpoint, org.apache.camel.PollingConsumer) method.acquirePollingConsumer in interface org.apache.camel.spi.ConsumerCacheendpoint - the endpointpublic org.apache.camel.Exchange receive(org.apache.camel.Endpoint endpoint)
receive in interface org.apache.camel.spi.ConsumerCachepublic org.apache.camel.Exchange receive(org.apache.camel.Endpoint endpoint,
                                         long timeout)
receive in interface org.apache.camel.spi.ConsumerCachepublic org.apache.camel.Exchange receiveNoWait(org.apache.camel.Endpoint endpoint)
receiveNoWait in interface org.apache.camel.spi.ConsumerCachepublic org.apache.camel.CamelContext getCamelContext()
public Object getSource()
getSource in interface org.apache.camel.spi.ConsumerCachepublic int getCapacity()
getCapacity in interface org.apache.camel.spi.ConsumerCachepublic int size()
size in interface org.apache.camel.spi.ConsumerCachepublic void purge()
purge in interface org.apache.camel.spi.ConsumerCachepublic void cleanUp()
cleanUp in interface org.apache.camel.spi.ConsumerCachepublic org.apache.camel.spi.EndpointUtilizationStatistics getEndpointUtilizationStatistics()
getEndpointUtilizationStatistics in interface org.apache.camel.spi.ConsumerCacheprotected void doInit()
               throws Exception
doInit in class org.apache.camel.support.service.BaseServiceExceptionprotected void doStart()
                throws Exception
doStart in class org.apache.camel.support.service.BaseServiceExceptionprotected void doStop()
               throws Exception
doStop in class org.apache.camel.support.service.BaseServiceExceptionApache Camel