public class InMemoryObjectStore<T extends Serializable> extends AbstractMonitoredObjectStore<T>
InMemoryObjectStore implements an optionally bounded in-memory store for message IDs with periodic expiry of old
entries. The bounded size is a soft limit and only enforced periodically by the expiry process; this means that the
store may temporarily exceed its maximum size between expiry runs, but will eventually shrink to its configured size.| Modifier and Type | Class and Description |
|---|---|
protected static class |
InMemoryObjectStore.StoredObject<T>
Represents the object stored in the store.
|
| Modifier and Type | Field and Description |
|---|---|
protected ConcurrentSkipListMap<Long,InMemoryObjectStore.StoredObject<T>> |
store |
context, entryTTL, expirationInterval, logger, maxEntries, name| Constructor and Description |
|---|
InMemoryObjectStore() |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
allKeys() |
void |
clear() |
void |
close() |
protected boolean |
doContains(String key) |
protected T |
doRemove(String key) |
protected T |
doRetrieve(String key) |
protected void |
doStore(String id,
T value) |
void |
expire() |
boolean |
isPersistent() |
void |
open() |
Map<String,T> |
retrieveAll() |
String |
toString() |
dispose, getEntryTTL, getExpirationInterval, getMaxEntries, getMuleContext, getName, initialise, run, setEntryTTL, setExpirationInterval, setMaxEntries, setMuleContext, setNamecontains, remove, retrieve, storeprotected final ConcurrentSkipListMap<Long,InMemoryObjectStore.StoredObject<T extends Serializable>> store
public boolean isPersistent()
protected boolean doContains(String key) throws org.mule.runtime.api.store.ObjectStoreException
doContains in class org.mule.runtime.api.store.TemplateObjectStore<T extends Serializable>org.mule.runtime.api.store.ObjectStoreExceptionprotected void doStore(String id, T value) throws org.mule.runtime.api.store.ObjectStoreException
doStore in class org.mule.runtime.api.store.TemplateObjectStore<T extends Serializable>org.mule.runtime.api.store.ObjectStoreExceptionprotected T doRetrieve(String key) throws org.mule.runtime.api.store.ObjectStoreException
doRetrieve in class org.mule.runtime.api.store.TemplateObjectStore<T extends Serializable>org.mule.runtime.api.store.ObjectStoreExceptionprotected T doRemove(String key) throws org.mule.runtime.api.store.ObjectStoreException
doRemove in class org.mule.runtime.api.store.TemplateObjectStore<T extends Serializable>org.mule.runtime.api.store.ObjectStoreExceptionpublic void clear()
throws org.mule.runtime.api.store.ObjectStoreException
org.mule.runtime.api.store.ObjectStoreExceptionpublic void open()
throws org.mule.runtime.api.store.ObjectStoreException
org.mule.runtime.api.store.ObjectStoreExceptionpublic void close()
throws org.mule.runtime.api.store.ObjectStoreException
org.mule.runtime.api.store.ObjectStoreExceptionpublic List<String> allKeys() throws org.mule.runtime.api.store.ObjectStoreException
org.mule.runtime.api.store.ObjectStoreExceptionpublic Map<String,T> retrieveAll() throws org.mule.runtime.api.store.ObjectStoreException
org.mule.runtime.api.store.ObjectStoreExceptionpublic void expire()
expire in class AbstractMonitoredObjectStore<T extends Serializable>Copyright © 2003–2021 MuleSoft, Inc.. All rights reserved.