|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.camel.support.ServiceSupport
org.apache.camel.impl.ConsumerCache
public class ConsumerCache
Cache containing created Consumer.
| Field Summary |
|---|
| Fields inherited from class org.apache.camel.support.ServiceSupport |
|---|
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending |
| Constructor Summary | |
|---|---|
ConsumerCache(Object source,
CamelContext camelContext)
|
|
ConsumerCache(Object source,
CamelContext camelContext,
int cacheSize)
|
|
ConsumerCache(Object source,
CamelContext camelContext,
Map<String,PollingConsumer> cache)
|
|
| Method Summary | |
|---|---|
protected static LRUCache<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. |
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 |
String |
toString()
|
| Methods inherited from class org.apache.camel.support.ServiceSupport |
|---|
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, resume, shutdown, start, stop, suspend |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ConsumerCache(Object source,
CamelContext camelContext)
public ConsumerCache(Object source,
CamelContext camelContext,
int cacheSize)
public ConsumerCache(Object source,
CamelContext camelContext,
Map<String,PollingConsumer> cache)
| Method Detail |
|---|
protected static LRUCache<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 Object getSource()
public int size()
public int getCapacity()
public long getHits()
public long getMisses()
public void resetCacheStatistics()
public void purge()
public String toString()
toString in class Object
protected void doStart()
throws Exception
doStart in class ServiceSupportException
protected void doStop()
throws Exception
doStop in class ServiceSupportException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||