public class TextFileObjectStore extends InMemoryObjectStore<String>
InMemoryObjectStore.StoredObject<T>| 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 |
clear()
Removes all items of this store without disposing it, meaning that after
performing a clear(), you should still be able perform other operations.
|
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.
|
boolean |
isPersistent()
Is this store persistent?
|
protected void |
loadFromStore() |
void |
setDirectory(String directory) |
void |
setEncoding(String encoding) |
void |
store(Serializable id,
String item)
Store the given Object.
|
contains, expire, remove, retrieve, toStringgetEntryTTL, getExpirationInterval, getMaxEntries, getMuleContext, getName, getScheduler, run, setEntryTTL, setExpirationInterval, setMaxEntries, setMuleContext, setName, setSchedulerprotected File fileStore
protected String directory
protected String encoding
public boolean isPersistent()
isPersistent in interface ObjectStore<String>isPersistent in class InMemoryObjectStore<String>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 AbstractMonitoredObjectStore<String>InitialisationException - if a fatal error occurs causing the Mule instance to shutdownRecoverableException - if an error occurs that can be recovered frompublic void store(Serializable id, String item) throws ObjectStoreException
ObjectStorestore in interface ObjectStore<String>store in class InMemoryObjectStore<String>id - the identifier for valueitem - the Object to store with keyObjectStoreException - if the given key cannot be stored or is
null.ObjectStoreNotAvaliableException - if the store is not available or any
other implementation-specific error occured.ObjectAlreadyExistsException - if an attempt is made to store an object
for a key that already has an object associated.public void clear()
ObjectStoreclear in interface ObjectStore<String>clear in class InMemoryObjectStore<String>public String getDirectory()
public void setDirectory(String directory)
public String getEncoding()
public void setEncoding(String encoding)
public void dispose()
Disposabledispose in interface Disposabledispose in class AbstractMonitoredObjectStore<String>Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.