public abstract class AbstractMonitoredObjectStore<T extends Serializable> extends Object implements ObjectStore<T>, Runnable, MuleContextAware, Initialisable, Disposable
Modifier and Type | Field and Description |
---|---|
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 |
PHASE_NAME
PHASE_NAME
Constructor and Description |
---|
AbstractMonitoredObjectStore() |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
A lifecycle method where implementor should free up any resources.
|
protected abstract void |
expire() |
int |
getEntryTTL() |
int |
getExpirationInterval() |
int |
getMaxEntries() |
protected MuleContext |
getMuleContext() |
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) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clear, contains, isPersistent, remove, retrieve, store
protected final Log logger
protected MuleContext context
protected ScheduledThreadPoolExecutor scheduler
protected int maxEntries
protected int entryTTL
protected int expirationInterval
protected String name
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 shutdownRecoverableException
- if an error occurs that can be recovered frompublic void dispose()
Disposable
dispose
in interface Disposable
protected MuleContext getMuleContext()
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()
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.