Save This Page
Home » oscache-2.4.1-full » com.opensymphony.oscache » base » persistence » [javadoc | source]
com.opensymphony.oscache.base.persistence
public interface: PersistenceListener [javadoc | source]

All Known Implementing Classes:
    AbstractDiskPersistenceListener, DiskPersistenceListener, HashDiskPersistenceListener, MockPersistenceListener

Defines the methods that are required to persist cache data. To provide a custom persistence mechanism you should implement this interface and supply the fully-qualified classname to the cache via the cache.persistence.class configuration property.
Method from com.opensymphony.oscache.base.persistence.PersistenceListener Summary:
clear,   configure,   isGroupStored,   isStored,   remove,   removeGroup,   retrieve,   retrieveGroup,   store,   storeGroup
Method from com.opensymphony.oscache.base.persistence.PersistenceListener Detail:
 public  void clear() throws CachePersistenceException
    Clear the entire persistent cache (including the root)
 public PersistenceListener configure(Config config)
    Allow the persistence code to initialize itself based on the supplied cache configuration.
 public boolean isGroupStored(String groupName) throws CachePersistenceException
    Verify if a group is currently stored in the persistent cache.
 public boolean isStored(String key) throws CachePersistenceException
    Verify if an object is currently stored in the persistent cache.
 public  void remove(String key) throws CachePersistenceException
    Removes an object from the persistent cache
 public  void removeGroup(String groupName) throws CachePersistenceException
    Removes a group from the persistent cache.
 public Object retrieve(String key) throws CachePersistenceException
    Retrieves an object from the persistent cache.
 public Set retrieveGroup(String groupName) throws CachePersistenceException
    Retrieves a group from the persistent cache.
 public  void store(String key,
    Object obj) throws CachePersistenceException
    Stores an object in the persistent cache.
 public  void storeGroup(String groupName,
    Set group) throws CachePersistenceException
    Stores a group in the persistent cache.