|
||||||||||
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 java.lang.String |
DEFAULT_QUEUE_STORE
The default queueStore directory for persistence |
static java.lang.String |
EXTENSION
|
protected MuleContext |
muleContext
|
Constructor Summary | |
---|---|
FilePersistenceStrategy()
|
|
FilePersistenceStrategy(WireFormat serializer)
|
Method Summary | |
---|---|
void |
close()
Closes the store. |
protected void |
createStoreDirectory(java.io.File direcetory)
|
boolean |
isTransient()
|
java.lang.Object |
load(java.lang.String queue,
java.lang.Object id)
Loads an object specified by the given id. |
void |
open()
Open the store. |
void |
remove(java.lang.String queue,
java.lang.Object id)
Removes the object specified by the given id from the store. |
java.util.List<QueuePersistenceStrategy.Holder> |
restore()
Retrieves the ids of the stored objects. |
protected void |
restoreFiles(java.io.File dir,
java.util.List<QueuePersistenceStrategy.Holder> msgs)
|
void |
setMuleContext(MuleContext context)
|
java.lang.Object |
store(java.lang.String queue,
java.lang.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 java.lang.String DEFAULT_QUEUE_STORE
public static final java.lang.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 java.lang.Object store(java.lang.String queue, java.lang.Object obj) throws java.io.IOException
QueuePersistenceStrategy
store
in interface QueuePersistenceStrategy
obj
- the object to be stored
java.io.IOException
protected void createStoreDirectory(java.io.File direcetory) throws java.io.IOException
java.io.IOException
public void remove(java.lang.String queue, java.lang.Object id) throws java.io.IOException
QueuePersistenceStrategy
remove
in interface QueuePersistenceStrategy
id
- the id of the stored object
java.io.IOException
public java.lang.Object load(java.lang.String queue, java.lang.Object id) throws java.io.IOException
QueuePersistenceStrategy
load
in interface QueuePersistenceStrategy
id
- the id of the stored object
java.io.IOException
public java.util.List<QueuePersistenceStrategy.Holder> restore() throws java.io.IOException
QueuePersistenceStrategy
restore
in interface QueuePersistenceStrategy
java.io.IOException
protected void restoreFiles(java.io.File dir, java.util.List<QueuePersistenceStrategy.Holder> msgs) throws java.io.IOException, java.lang.ClassNotFoundException
java.io.IOException
java.lang.ClassNotFoundException
public void open() throws java.io.IOException
QueuePersistenceStrategy
open
in interface QueuePersistenceStrategy
java.io.IOException
public void close() throws java.io.IOException
QueuePersistenceStrategy
close
in interface QueuePersistenceStrategy
java.io.IOException
public boolean isTransient()
isTransient
in interface QueuePersistenceStrategy
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |