org.mule.util.store
Class MuleObjectStoreManager
java.lang.Object
org.mule.util.store.MuleObjectStoreManager
- All Implemented Interfaces:
- MuleContextAware, Disposable, Initialisable, ObjectStoreManager
public class MuleObjectStoreManager
- extends Object
- implements ObjectStoreManager, MuleContextAware, Initialisable, Disposable
|
Method Summary |
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 |
|
getObjectStore(String name)
Return the partition of the default in-memory store with the given name, creating it
if necessary. |
|
getObjectStore(String name,
boolean isPersistent)
Return the partition of the default in-memory or persistent store with the given name, creating it
if necessary. |
|
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. |
|
getUserObjectStore(String name,
boolean isPersistent)
|
|
getUserObjectStore(String name,
boolean isPersistent,
int maxEntries,
int entryTTL,
int expirationInterval)
|
void |
initialise()
Method used to perform any initialisation work. |
|
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)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
scheduler
protected ScheduledThreadPoolExecutor scheduler
MuleObjectStoreManager
public MuleObjectStoreManager()
getObjectStore
public <T extends ObjectStore<? extends Serializable>> T getObjectStore(String name)
- Description copied from interface:
ObjectStoreManager
- Return the partition of the default in-memory store with the given name, creating it
if necessary.
- Specified by:
getObjectStore in interface ObjectStoreManager
- Parameters:
name - the name of the object store
- Returns:
- an
ObjectStore
getObjectStore
public <T extends ObjectStore<? extends Serializable>> T getObjectStore(String name,
boolean isPersistent)
- Description copied from interface:
ObjectStoreManager
- Return the partition of the default in-memory or persistent store with the given name, creating it
if necessary.
- Specified by:
getObjectStore in interface ObjectStoreManager
- Parameters:
name - the name of the object storeisPersistent - whether it should be in memory or persistent
- Returns:
- an
ObjectStore
getObjectStore
public <T extends ObjectStore<? extends Serializable>> T getObjectStore(String name,
boolean isPersistent,
int maxEntries,
int entryTTL,
int expirationInterval)
- Description copied from interface:
ObjectStoreManager
- Return the monitored partition of the default in-memory or persistent store with the given name, creating it
if necessary.
- Specified by:
getObjectStore in interface ObjectStoreManager
- Parameters:
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 run
- Returns:
- an
ObjectStore
getUserObjectStore
public <T extends ObjectStore<? extends Serializable>> T getUserObjectStore(String name,
boolean isPersistent)
getUserObjectStore
public <T extends ObjectStore<? extends Serializable>> T getUserObjectStore(String name,
boolean isPersistent,
int maxEntries,
int entryTTL,
int expirationInterval)
internalCreateStore
public <T extends ObjectStore<? extends Serializable>> T internalCreateStore(ListableObjectStore<? extends Serializable> baseStore,
String name,
int maxEntries,
int entryTTL,
int expirationInterval)
setMuleContext
public void setMuleContext(MuleContext context)
- Specified by:
setMuleContext in interface MuleContextAware
clearStoreCache
public void clearStoreCache()
dispose
public void dispose()
- Description copied from interface:
Disposable
- A lifecycle method where implementor should free up any resources. If an
exception is thrown it should just be logged and processing should continue.
This method should not throw Runtime exceptions.
- Specified by:
dispose in interface Disposable
initialise
public void initialise()
throws InitialisationException
- Description copied from interface:
Initialisable
- Method used to perform any initialisation work. If a fatal error occurs during
initialisation an
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.
- Specified by:
initialise in interface Initialisable
- Throws:
InitialisationException - if a fatal error occurs causing the Mule instance to shutdown
RecoverableException - if an error occurs that can be recovered from
disposeStore
public void disposeStore(ObjectStore<? extends Serializable> store)
throws ObjectStoreException
- Description copied from interface:
ObjectStoreManager
- Delete all objects from the partition
- Specified by:
disposeStore in interface ObjectStoreManager
- Throws:
ObjectStoreException
setBasePersistentStoreKey
public void setBasePersistentStoreKey(String basePersistentStoreKey)
setBaseTransientStoreKey
public void setBaseTransientStoreKey(String baseTransientStoreKey)
setBasePersistentUserStoreKey
public void setBasePersistentUserStoreKey(String basePersistentUserStoreKey)
setBaseTransientUserStoreKey
public void setBaseTransientUserStoreKey(String baseTransientUserStoreKey)
Copyright © 2003–2014 MuleSoft, Inc.. All rights reserved.