public class TextFileObjectStore extends InMemoryObjectStore
InMemoryObjectStore.StoredObject| Modifier and Type | Field and Description |
|---|---|
protected String |
directory |
protected String |
encoding |
protected File |
fileStore |
storecontext, entryTTL, expirationInterval, logger, maxEntries, name, schedulerPHASE_NAMEPHASE_NAME| Constructor and Description |
|---|
TextFileObjectStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
A lifecycle method where implementor should free up any resources.
|
String |
getDirectory() |
String |
getEncoding() |
void |
initialise()
Method used to perform any initialisation work.
|
protected void |
loadFromStore() |
void |
setDirectory(String directory) |
void |
setEncoding(String encoding) |
boolean |
storeObject(String id,
Object item)
Store the given Object.
|
containsObject, expire, removeObject, retrieveObjectgetEntryTTL, getExpirationInterval, getMaxEntries, getName, getScheduler, run, setEntryTTL, setExpirationInterval, setMaxEntries, setMuleContext, setName, setSchedulerprotected File fileStore
protected String directory
protected String encoding
public void initialise()
throws InitialisationException
InitialisableInitialisationException 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 Initialisableinitialise in class AbstractMonitoredObjectStoreInitialisationException - if a fatal error occurs causing the Mule instance to shutdownRecoverableException - if an error occurs that can be recovered frompublic boolean storeObject(String id, Object item) throws Exception
storeObject in interface ObjectStorestoreObject in class InMemoryObjectStoreid - the ID to storeitem - the Object to store with the idtrue if the ID was stored properly, or false
if it already existedIllegalArgumentException - if the given ID cannot be stored or is
nullException - if the store is not available or any other
implementation-specific error occuredpublic String getDirectory()
public void setDirectory(String directory)
public String getEncoding()
public void setEncoding(String encoding)
public void dispose()
AbstractMonitoredObjectStoredispose in interface Disposabledispose in class AbstractMonitoredObjectStoreCopyright © 2003-2012 MuleSource, Inc.. All Rights Reserved.