|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.camel.impl.ServiceSupport
org.apache.camel.impl.ConsumerCache
public class ConsumerCache
Cache containing created Consumer
.
Constructor Summary | |
---|---|
ConsumerCache(java.lang.Object source,
CamelContext camelContext)
|
|
ConsumerCache(java.lang.Object source,
CamelContext camelContext,
int cacheSize)
|
|
ConsumerCache(java.lang.Object source,
CamelContext camelContext,
java.util.Map<java.lang.String,PollingConsumer> cache)
|
Method Summary | |
---|---|
protected static LRUCache<java.lang.String,PollingConsumer> |
createLRUCache(int cacheSize)
Creates the LRUCache to be used. |
protected void |
doStart()
|
protected void |
doStop()
|
CamelContext |
getCamelContext()
|
int |
getCapacity()
Gets the maximum cache size (capacity). |
PollingConsumer |
getConsumer(Endpoint endpoint)
|
long |
getHits()
Gets the cache hits statistic Will return -1 if it cannot determine this if a custom cache was used. |
long |
getMisses()
Gets the cache misses statistic Will return -1 if it cannot determine this if a custom cache was used. |
java.lang.Object |
getSource()
Gets the source which uses this cache |
void |
purge()
Purges this cache |
Exchange |
receive(Endpoint endpoint)
|
Exchange |
receive(Endpoint endpoint,
long timeout)
|
Exchange |
receiveNoWait(Endpoint endpoint)
|
void |
resetCacheStatistics()
Resets the cache statistics |
int |
size()
Returns the current size of the cache |
java.lang.String |
toString()
|
Methods inherited from class org.apache.camel.impl.ServiceSupport |
---|
addChildService, doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, removeChildService, resume, shutdown, start, start, stop, suspend |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ConsumerCache(java.lang.Object source, CamelContext camelContext)
public ConsumerCache(java.lang.Object source, CamelContext camelContext, int cacheSize)
public ConsumerCache(java.lang.Object source, CamelContext camelContext, java.util.Map<java.lang.String,PollingConsumer> cache)
Method Detail |
---|
protected static LRUCache<java.lang.String,PollingConsumer> createLRUCache(int cacheSize)
LRUCache
to be used.
This implementation returns a LRUSoftCache
instance.
cacheSize
- the cache size
public PollingConsumer getConsumer(Endpoint endpoint)
public Exchange receive(Endpoint endpoint)
public Exchange receive(Endpoint endpoint, long timeout)
public Exchange receiveNoWait(Endpoint endpoint)
public CamelContext getCamelContext()
public java.lang.Object getSource()
public int size()
public int getCapacity()
public long getHits()
public long getMisses()
public void resetCacheStatistics()
public void purge()
public java.lang.String toString()
toString
in class java.lang.Object
protected void doStart() throws java.lang.Exception
doStart
in class ServiceSupport
java.lang.Exception
protected void doStop() throws java.lang.Exception
doStop
in class ServiceSupport
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |