|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mule.util.store.AbstractMonitoredObjectStore<T>
public abstract class AbstractMonitoredObjectStore<T extends Serializable>
TODO
Field Summary | |
---|---|
protected MuleContext |
context
|
protected int |
entryTTL
The time-to-live for each message ID, specified in milliseconds, or -1 for entries that should never expire. |
protected int |
expirationInterval
The interval for periodic bounded size enforcement and entry expiration, specified in milliseconds. |
protected Log |
logger
|
protected int |
maxEntries
the maximum number of entries that this store keeps around. |
protected String |
name
A name for this store, can be used for logging and identification purposes. |
protected ScheduledThreadPoolExecutor |
scheduler
|
Fields inherited from interface org.mule.api.lifecycle.Initialisable |
---|
PHASE_NAME |
Fields inherited from interface org.mule.api.lifecycle.Disposable |
---|
PHASE_NAME |
Constructor Summary | |
---|---|
AbstractMonitoredObjectStore()
|
Method Summary | |
---|---|
void |
dispose()
A lifecycle method where implementor should free up any resources. |
protected abstract void |
expire()
|
int |
getEntryTTL()
|
int |
getExpirationInterval()
|
int |
getMaxEntries()
|
String |
getName()
|
ScheduledThreadPoolExecutor |
getScheduler()
|
void |
initialise()
Method used to perform any initialisation work. |
void |
run()
|
void |
setEntryTTL(int entryTTL)
|
void |
setExpirationInterval(int expirationInterval)
|
void |
setMaxEntries(int maxEntries)
|
void |
setMuleContext(MuleContext context)
|
void |
setName(String id)
|
void |
setScheduler(ScheduledThreadPoolExecutor scheduler)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.mule.api.store.ObjectStore |
---|
contains, isPersistent, remove, retrieve, store |
Field Detail |
---|
protected final Log logger
protected MuleContext context
protected ScheduledThreadPoolExecutor scheduler
protected int maxEntries
protected int entryTTL
protected int expirationInterval
protected String name
Constructor Detail |
---|
public AbstractMonitoredObjectStore()
Method Detail |
---|
public void initialise() throws InitialisationException
Initialisable
InitialisationException
should be thrown,
causing the Mule instance to shutdown. If the error is recoverable, say by
retrying to connect, a RecoverableException
should be thrown.
There is no guarantee that by throwing a Recoverable exception that the Mule
instance will not shut down.
initialise
in interface Initialisable
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdown
RecoverableException
- if an error occurs that can be recovered frompublic final void run()
run
in interface Runnable
public void dispose()
Disposable
dispose
in interface Disposable
public void setEntryTTL(int entryTTL)
public void setExpirationInterval(int expirationInterval)
public void setMaxEntries(int maxEntries)
public void setScheduler(ScheduledThreadPoolExecutor scheduler)
public void setName(String id)
public void setMuleContext(MuleContext context)
setMuleContext
in interface MuleContextAware
public int getEntryTTL()
public int getExpirationInterval()
public int getMaxEntries()
public String getName()
public ScheduledThreadPoolExecutor getScheduler()
protected abstract void expire()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |