|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mule.util.queue.FilePersistenceStrategy
public class FilePersistenceStrategy
| Nested Class Summary | |
|---|---|
protected static class |
FilePersistenceStrategy.HolderImpl
|
| Nested classes/interfaces inherited from interface org.mule.util.queue.QueuePersistenceStrategy |
|---|
QueuePersistenceStrategy.Holder |
| Field Summary | |
|---|---|
static String |
DEFAULT_QUEUE_STORE
The default queueStore directory for persistence |
static String |
EXTENSION
|
protected MuleContext |
muleContext
|
| Constructor Summary | |
|---|---|
FilePersistenceStrategy()
|
|
FilePersistenceStrategy(WireFormat serializer)
|
|
| Method Summary | |
|---|---|
void |
close()
Closes the store. |
protected void |
createStoreDirectory(File direcetory)
|
boolean |
isTransient()
|
Object |
load(String queue,
Object id)
Loads an object specified by the given id. |
void |
open()
Open the store. |
void |
remove(String queue,
Object id)
Removes the object specified by the given id from the store. |
List<QueuePersistenceStrategy.Holder> |
restore()
Retrieves the ids of the stored objects. |
protected void |
restoreFiles(File dir,
List<QueuePersistenceStrategy.Holder> msgs)
|
void |
setMuleContext(MuleContext context)
|
Object |
store(String queue,
Object obj)
Stores an object and returns its generated id. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_QUEUE_STORE
public static final String EXTENSION
protected MuleContext muleContext
| Constructor Detail |
|---|
public FilePersistenceStrategy(WireFormat serializer)
public FilePersistenceStrategy()
| Method Detail |
|---|
public void setMuleContext(MuleContext context)
setMuleContext in interface MuleContextAware
public Object store(String queue,
Object obj)
throws IOException
QueuePersistenceStrategy
store in interface QueuePersistenceStrategyobj - the object to be stored
IOException
protected void createStoreDirectory(File direcetory)
throws IOException
IOException
public void remove(String queue,
Object id)
throws IOException
QueuePersistenceStrategy
remove in interface QueuePersistenceStrategyid - the id of the stored object
IOException
public Object load(String queue,
Object id)
throws IOException
QueuePersistenceStrategy
load in interface QueuePersistenceStrategyid - the id of the stored object
IOException
public List<QueuePersistenceStrategy.Holder> restore()
throws IOException
QueuePersistenceStrategy
restore in interface QueuePersistenceStrategyIOException
protected void restoreFiles(File dir,
List<QueuePersistenceStrategy.Holder> msgs)
throws IOException,
ClassNotFoundException
IOException
ClassNotFoundException
public void open()
throws IOException
QueuePersistenceStrategy
open in interface QueuePersistenceStrategyIOException
public void close()
throws IOException
QueuePersistenceStrategy
close in interface QueuePersistenceStrategyIOExceptionpublic boolean isTransient()
isTransient in interface QueuePersistenceStrategy
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||