Class EmptyConsumerCache
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.cache.DefaultConsumerCache
org.apache.camel.support.cache.EmptyConsumerCache
- All Implemented Interfaces:
AutoCloseable, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.ConsumerCache, org.apache.camel.StatefulService, org.apache.camel.SuspendableService
A
ConsumerCache that does not cache PollingConsumers but instead creates a new
consumer on every acquirePollingConsumer(Endpoint) and stops and shuts it down on
releasePollingConsumer(Endpoint, PollingConsumer).- Since:
- 4.21
-
Field Summary
Fields inherited from class DefaultConsumerCache
CONTEXT_IS_STOPPEDFields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING -
Constructor Summary
ConstructorsConstructorDescriptionEmptyConsumerCache(Object source, org.apache.camel.CamelContext camelContext) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.camel.PollingConsumeracquirePollingConsumer(org.apache.camel.Endpoint endpoint) Acquires a pooled PollingConsumer which you must release back again after usage using theDefaultConsumerCache.releasePollingConsumer(org.apache.camel.Endpoint, org.apache.camel.PollingConsumer)method.intGets the maximum cache size (capacity).voidreleasePollingConsumer(org.apache.camel.Endpoint endpoint, org.apache.camel.PollingConsumer pollingConsumer) Releases an acquired producer back after usage.toString()Methods inherited from class DefaultConsumerCache
cleanUp, createServicePool, doBuild, doInit, doShutdown, doStart, doStop, getCamelContext, getEndpointUtilizationStatistics, getSource, isExtendedStatistics, purge, receive, receive, receiveNoWait, setExtendedStatistics, sizeMethods inherited from class org.apache.camel.support.service.BaseService
build, doFail, doLifecycleChange, doResume, doSuspend, fail, getInternalLock, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
EmptyConsumerCache
-
-
Method Details
-
acquirePollingConsumer
public org.apache.camel.PollingConsumer acquirePollingConsumer(org.apache.camel.Endpoint endpoint) Description copied from class:DefaultConsumerCacheAcquires a pooled PollingConsumer which you must release back again after usage using theDefaultConsumerCache.releasePollingConsumer(org.apache.camel.Endpoint, org.apache.camel.PollingConsumer)method.- Specified by:
acquirePollingConsumerin interfaceorg.apache.camel.spi.ConsumerCache- Overrides:
acquirePollingConsumerin classDefaultConsumerCache- Parameters:
endpoint- the endpoint- Returns:
- the PollingConsumer
-
releasePollingConsumer
public void releasePollingConsumer(org.apache.camel.Endpoint endpoint, org.apache.camel.PollingConsumer pollingConsumer) Description copied from class:DefaultConsumerCacheReleases an acquired producer back after usage.- Specified by:
releasePollingConsumerin interfaceorg.apache.camel.spi.ConsumerCache- Overrides:
releasePollingConsumerin classDefaultConsumerCache- Parameters:
endpoint- the endpointpollingConsumer- the pollingConsumer to release
-
getCapacity
public int getCapacity()Description copied from class:DefaultConsumerCacheGets the maximum cache size (capacity).- Specified by:
getCapacityin interfaceorg.apache.camel.spi.ConsumerCache- Overrides:
getCapacityin classDefaultConsumerCache- Returns:
- the capacity
-
toString
- Overrides:
toStringin classDefaultConsumerCache
-