public class MuleObjectStoreManager extends Object implements ObjectStoreManager, MuleContextAware, Initialisable, Disposable
Modifier and Type | Field and Description |
---|---|
protected ScheduledThreadPoolExecutor |
scheduler |
UNBOUNDED
PHASE_NAME
PHASE_NAME
Constructor and Description |
---|
MuleObjectStoreManager() |
Modifier and Type | Method and Description |
---|---|
void |
clearStoreCache() |
void |
dispose()
A lifecycle method where implementor should free up any resources.
|
void |
disposeStore(ObjectStore<? extends Serializable> store)
Delete all objects from the partition
|
<T extends ObjectStore<? extends Serializable>> |
getObjectStore(String name)
Return the partition of the default in-memory store with the given name, creating it
if necessary.
|
<T extends ObjectStore<? extends Serializable>> |
getObjectStore(String name,
boolean isPersistent)
Return the partition of the default in-memory or persistent store with the given name, creating it
if necessary.
|
<T extends ObjectStore<? extends Serializable>> |
getObjectStore(String name,
boolean isPersistent,
int maxEntries,
int entryTTL,
int expirationInterval)
Return the monitored partition of the default in-memory or persistent store with the given name, creating it
if necessary.
|
<T extends ObjectStore<? extends Serializable>> |
getUserObjectStore(String name,
boolean isPersistent) |
<T extends ObjectStore<? extends Serializable>> |
getUserObjectStore(String name,
boolean isPersistent,
int maxEntries,
int entryTTL,
int expirationInterval) |
void |
initialise()
Method used to perform any initialisation work.
|
<T extends ObjectStore<? extends Serializable>> |
internalCreateStore(ListableObjectStore<? extends Serializable> baseStore,
String name,
int maxEntries,
int entryTTL,
int expirationInterval) |
void |
setBasePersistentStoreKey(String basePersistentStoreKey) |
void |
setBasePersistentUserStoreKey(String basePersistentUserStoreKey) |
void |
setBaseTransientStoreKey(String baseTransientStoreKey) |
void |
setBaseTransientUserStoreKey(String baseTransientUserStoreKey) |
void |
setMuleContext(MuleContext context) |
protected ScheduledThreadPoolExecutor scheduler
public <T extends ObjectStore<? extends Serializable>> T getObjectStore(String name)
ObjectStoreManager
getObjectStore
in interface ObjectStoreManager
name
- the name of the object storeObjectStore
public <T extends ObjectStore<? extends Serializable>> T getObjectStore(String name, boolean isPersistent)
ObjectStoreManager
getObjectStore
in interface ObjectStoreManager
name
- the name of the object storeisPersistent
- whether it should be in memory or persistentObjectStore
public <T extends ObjectStore<? extends Serializable>> T getObjectStore(String name, boolean isPersistent, int maxEntries, int entryTTL, int expirationInterval)
ObjectStoreManager
getObjectStore
in interface ObjectStoreManager
name
- the name of the object storeisPersistent
- whether it should be in memory or persistentmaxEntries
- what's the max number of entries allowed. Exceeding entries will be removed when expiration thread runsentryTTL
- entry timeout in milliseconds.expirationInterval
- how frequently should the expiration thread runObjectStore
public <T extends ObjectStore<? extends Serializable>> T getUserObjectStore(String name, boolean isPersistent)
public <T extends ObjectStore<? extends Serializable>> T getUserObjectStore(String name, boolean isPersistent, int maxEntries, int entryTTL, int expirationInterval)
public <T extends ObjectStore<? extends Serializable>> T internalCreateStore(ListableObjectStore<? extends Serializable> baseStore, String name, int maxEntries, int entryTTL, int expirationInterval)
public void setMuleContext(MuleContext context)
setMuleContext
in interface MuleContextAware
public void clearStoreCache()
public void dispose()
Disposable
dispose
in interface Disposable
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 disposeStore(ObjectStore<? extends Serializable> store) throws ObjectStoreException
ObjectStoreManager
disposeStore
in interface ObjectStoreManager
ObjectStoreException
public void setBasePersistentStoreKey(String basePersistentStoreKey)
public void setBaseTransientStoreKey(String baseTransientStoreKey)
public void setBasePersistentUserStoreKey(String basePersistentUserStoreKey)
public void setBaseTransientUserStoreKey(String baseTransientUserStoreKey)
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.