public interface ConsumerCache extends Service
PollingConsumer.| Modifier and Type | Method and Description |
|---|---|
PollingConsumer |
acquirePollingConsumer(Endpoint endpoint)
Acquires a pooled polling consumer which you must release back again after usage using the
releasePollingConsumer(Endpoint, PollingConsumer) method. |
void |
cleanUp()
Cleanup the cache (purging stale entries)
|
int |
getCapacity()
Gets the maximum cache size (capacity).
|
EndpointUtilizationStatistics |
getEndpointUtilizationStatistics()
Gets the endpoint statistics
|
Object |
getSource()
Gets the source which uses this cache
|
void |
purge()
Purges this cache
|
Exchange |
receive(Endpoint endpoint)
Waits until a message is available and then returns it.
|
Exchange |
receive(Endpoint endpoint,
long timeout)
Attempts to receive a message exchange, waiting up to the given timeout to expire if a message is not yet
available.
|
Exchange |
receiveNoWait(Endpoint endpoint)
Attempts to receive a message exchange immediately without waiting and returning null if a message
exchange is not available yet.
|
void |
releasePollingConsumer(Endpoint endpoint,
PollingConsumer pollingConsumer)
Releases an acquired polling consumer back after usage.
|
int |
size()
Returns the current size of the cache
|
PollingConsumer acquirePollingConsumer(Endpoint endpoint)
releasePollingConsumer(Endpoint, PollingConsumer) method.endpoint - the endpointvoid releasePollingConsumer(Endpoint endpoint, PollingConsumer pollingConsumer)
endpoint - the endpointpollingConsumer - the consumer to releaseExchange receive(Endpoint endpoint)
UnitOfWork on
the returned Exchangeendpoint - the endpoint to receive fromExchange receive(Endpoint endpoint, long timeout)
UnitOfWork on
the returned Exchangeendpoint - the endpoint to receive fromtimeout - the amount of time in milliseconds to wait for a message before timing out and returning
nullExchange receiveNoWait(Endpoint endpoint)
UnitOfWork on
the returned Exchangeendpoint - the endpoint to receive fromObject getSource()
int getCapacity()
int size()
void purge()
void cleanUp()
EndpointUtilizationStatistics getEndpointUtilizationStatistics()
Apache Camel