org.mule.util.queue
Class CachingPersistenceStrategy

java.lang.Object
  extended by org.mule.util.queue.CachingPersistenceStrategy
All Implemented Interfaces:
QueuePersistenceStrategy

public class CachingPersistenceStrategy
extends Object
implements QueuePersistenceStrategy


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.mule.util.queue.QueuePersistenceStrategy
QueuePersistenceStrategy.Holder
 
Constructor Summary
CachingPersistenceStrategy(QueuePersistenceStrategy ps)
           
 
Method Summary
 void close()
          Closes the store.
 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 restore()
          Retrieves the ids of the stored objects.
 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
 

Constructor Detail

CachingPersistenceStrategy

public CachingPersistenceStrategy(QueuePersistenceStrategy ps)
Method Detail

open

public void open()
          throws IOException
Description copied from interface: QueuePersistenceStrategy
Open the store.

Specified by:
open in interface QueuePersistenceStrategy
Throws:
IOException

close

public void close()
           throws IOException
Description copied from interface: QueuePersistenceStrategy
Closes the store.

Specified by:
close in interface QueuePersistenceStrategy
Throws:
IOException

load

public Object load(String queue,
                   Object id)
            throws IOException
Description copied from interface: QueuePersistenceStrategy
Loads an object specified by the given id.

Specified by:
load in interface QueuePersistenceStrategy
id - the id of the stored object
Returns:
the object
Throws:
IOException

remove

public void remove(String queue,
                   Object id)
            throws IOException
Description copied from interface: QueuePersistenceStrategy
Removes the object specified by the given id from the store.

Specified by:
remove in interface QueuePersistenceStrategy
id - the id of the stored object
Throws:
IOException

restore

public List restore()
             throws IOException
Description copied from interface: QueuePersistenceStrategy
Retrieves the ids of the stored objects.

Specified by:
restore in interface QueuePersistenceStrategy
Returns:
the list of ids
Throws:
IOException

store

public Object store(String queue,
                    Object obj)
             throws IOException
Description copied from interface: QueuePersistenceStrategy
Stores an object and returns its generated id.

Specified by:
store in interface QueuePersistenceStrategy
obj - the object to be stored
Returns:
the id of the stored object
Throws:
IOException

isTransient

public boolean isTransient()
Specified by:
isTransient in interface QueuePersistenceStrategy


Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.