public class MonitoredObjectStoreWrapper<T extends Serializable> extends Object implements ListableObjectStore<T>, Runnable, MuleContextAware, org.mule.runtime.api.lifecycle.Initialisable, org.mule.runtime.api.lifecycle.Disposable
| Modifier and Type | Class and Description |
|---|---|
static class |
MonitoredObjectStoreWrapper.StoredObject<T> |
| Modifier and Type | Field and Description |
|---|---|
protected MuleContext |
context |
protected long |
entryTTL
The time-to-live for each message ID, specified in milliseconds, or -1 for entries that should never expire.
|
protected long |
expirationInterval
The interval for periodic bounded size enforcement and entry expiration, specified in milliseconds.
|
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.
|
| Constructor and Description |
|---|
MonitoredObjectStoreWrapper(ListableObjectStore<MonitoredObjectStoreWrapper.StoredObject<T>> baseStore) |
MonitoredObjectStoreWrapper(ListableObjectStore<MonitoredObjectStoreWrapper.StoredObject<T>> baseStore,
int maxEntries,
long entryTTL,
long expirationInterval) |
| Modifier and Type | Method and Description |
|---|---|
List<Serializable> |
allKeys() |
void |
clear() |
void |
close()
Close the underlying store.
|
boolean |
contains(Serializable key) |
void |
dispose() |
void |
expire() |
void |
initialise() |
boolean |
isPersistent() |
void |
open()
Open the underlying store.
|
T |
remove(Serializable key) |
T |
retrieve(Serializable key) |
void |
run() |
void |
setMuleContext(MuleContext context) |
void |
store(Serializable key,
T value) |
protected MuleContext context
protected int maxEntries
protected long entryTTL
protected long expirationInterval
protected String name
public MonitoredObjectStoreWrapper(ListableObjectStore<MonitoredObjectStoreWrapper.StoredObject<T>> baseStore)
public MonitoredObjectStoreWrapper(ListableObjectStore<MonitoredObjectStoreWrapper.StoredObject<T>> baseStore, int maxEntries, long entryTTL, long expirationInterval)
public boolean contains(Serializable key) throws org.mule.runtime.api.store.ObjectStoreException
contains in interface org.mule.runtime.api.store.ObjectStore<T extends Serializable>org.mule.runtime.api.store.ObjectStoreExceptionpublic void store(Serializable key, T value) throws org.mule.runtime.api.store.ObjectStoreException
store in interface org.mule.runtime.api.store.ObjectStore<T extends Serializable>org.mule.runtime.api.store.ObjectStoreExceptionpublic T retrieve(Serializable key) throws org.mule.runtime.api.store.ObjectStoreException
retrieve in interface org.mule.runtime.api.store.ObjectStore<T extends Serializable>org.mule.runtime.api.store.ObjectStoreExceptionpublic void clear()
throws org.mule.runtime.api.store.ObjectStoreException
clear in interface org.mule.runtime.api.store.ObjectStore<T extends Serializable>org.mule.runtime.api.store.ObjectStoreExceptionpublic T remove(Serializable key) throws org.mule.runtime.api.store.ObjectStoreException
remove in interface org.mule.runtime.api.store.ObjectStore<T extends Serializable>org.mule.runtime.api.store.ObjectStoreExceptionpublic boolean isPersistent()
isPersistent in interface org.mule.runtime.api.store.ObjectStore<T extends Serializable>public void open()
throws org.mule.runtime.api.store.ObjectStoreException
ListableObjectStoreopen in interface ListableObjectStore<T extends Serializable>org.mule.runtime.api.store.ObjectStoreException - if an exception occurred while opening the underlying store.public void close()
throws org.mule.runtime.api.store.ObjectStoreException
ListableObjectStoreclose in interface ListableObjectStore<T extends Serializable>org.mule.runtime.api.store.ObjectStoreException - if an exception occurred while closing the underlying store.public List<Serializable> allKeys() throws org.mule.runtime.api.store.ObjectStoreException
allKeys in interface ListableObjectStore<T extends Serializable>org.mule.runtime.api.store.ObjectStoreException - if an exception occurred while collecting the list of all keys.public void setMuleContext(MuleContext context)
setMuleContext in interface MuleContextAwarecontext - the Mule node.public void expire()
public void dispose()
dispose in interface org.mule.runtime.api.lifecycle.Disposablepublic void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
initialise in interface org.mule.runtime.api.lifecycle.Initialisableorg.mule.runtime.api.lifecycle.InitialisationExceptionCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.