Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.opensymphony.oscache.base.algorithm
Class TestAbstractCache.MockPersistenceListener  view TestAbstractCache.MockPersistenceListener download TestAbstractCache.MockPersistenceListener.java

java.lang.Object
  extended bycom.opensymphony.oscache.base.algorithm.TestAbstractCache.MockPersistenceListener
All Implemented Interfaces:
com.opensymphony.oscache.base.persistence.PersistenceListener
Enclosing class:
TestAbstractCache

private static class TestAbstractCache.MockPersistenceListener
extends java.lang.Object
implements com.opensymphony.oscache.base.persistence.PersistenceListener


Field Summary
private  java.util.Map entries
           
private  java.util.Map groups
           
 
Constructor Summary
private TestAbstractCache.MockPersistenceListener()
           
 
Method Summary
 void clear()
          Clear the entire persistent cache (including the root)
 com.opensymphony.oscache.base.persistence.PersistenceListener configure(com.opensymphony.oscache.base.Config config)
          Allow the persistence code to initialize itself based on the supplied cache configuration.
 boolean isGroupStored(java.lang.String groupName)
          Verify if a group is currently stored in the persistent cache.
 boolean isStored(java.lang.String key)
          Verify if an object is currently stored in the persistent cache.
 void remove(java.lang.String key)
          Removes an object from the persistent cache
 void removeGroup(java.lang.String groupName)
          Removes a group from the persistent cache.
 java.lang.Object retrieve(java.lang.String key)
          Retrieves an object from the persistent cache.
 java.util.Set retrieveGroup(java.lang.String groupName)
          Retrieves a group from the persistent cache.
 void store(java.lang.String key, java.lang.Object obj)
          Stores an object in the persistent cache.
 void storeGroup(java.lang.String groupName, java.util.Set group)
          Stores a group in the persistent cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

entries

private java.util.Map entries

groups

private java.util.Map groups
Constructor Detail

TestAbstractCache.MockPersistenceListener

private TestAbstractCache.MockPersistenceListener()
Method Detail

clear

public void clear()
           throws com.opensymphony.oscache.base.persistence.CachePersistenceException
Description copied from interface: com.opensymphony.oscache.base.persistence.PersistenceListener
Clear the entire persistent cache (including the root)

Specified by:
clear in interface com.opensymphony.oscache.base.persistence.PersistenceListener

configure

public com.opensymphony.oscache.base.persistence.PersistenceListener configure(com.opensymphony.oscache.base.Config config)
Description copied from interface: com.opensymphony.oscache.base.persistence.PersistenceListener
Allow the persistence code to initialize itself based on the supplied cache configuration.

Specified by:
configure in interface com.opensymphony.oscache.base.persistence.PersistenceListener

isGroupStored

public boolean isGroupStored(java.lang.String groupName)
                      throws com.opensymphony.oscache.base.persistence.CachePersistenceException
Description copied from interface: com.opensymphony.oscache.base.persistence.PersistenceListener
Verify if a group is currently stored in the persistent cache.

Specified by:
isGroupStored in interface com.opensymphony.oscache.base.persistence.PersistenceListener

isStored

public boolean isStored(java.lang.String key)
                 throws com.opensymphony.oscache.base.persistence.CachePersistenceException
Description copied from interface: com.opensymphony.oscache.base.persistence.PersistenceListener
Verify if an object is currently stored in the persistent cache.

Specified by:
isStored in interface com.opensymphony.oscache.base.persistence.PersistenceListener

remove

public void remove(java.lang.String key)
            throws com.opensymphony.oscache.base.persistence.CachePersistenceException
Description copied from interface: com.opensymphony.oscache.base.persistence.PersistenceListener
Removes an object from the persistent cache

Specified by:
remove in interface com.opensymphony.oscache.base.persistence.PersistenceListener

removeGroup

public void removeGroup(java.lang.String groupName)
                 throws com.opensymphony.oscache.base.persistence.CachePersistenceException
Description copied from interface: com.opensymphony.oscache.base.persistence.PersistenceListener
Removes a group from the persistent cache.

Specified by:
removeGroup in interface com.opensymphony.oscache.base.persistence.PersistenceListener

retrieve

public java.lang.Object retrieve(java.lang.String key)
                          throws com.opensymphony.oscache.base.persistence.CachePersistenceException
Description copied from interface: com.opensymphony.oscache.base.persistence.PersistenceListener
Retrieves an object from the persistent cache.

Specified by:
retrieve in interface com.opensymphony.oscache.base.persistence.PersistenceListener

retrieveGroup

public java.util.Set retrieveGroup(java.lang.String groupName)
                            throws com.opensymphony.oscache.base.persistence.CachePersistenceException
Description copied from interface: com.opensymphony.oscache.base.persistence.PersistenceListener
Retrieves a group from the persistent cache.

Specified by:
retrieveGroup in interface com.opensymphony.oscache.base.persistence.PersistenceListener

store

public void store(java.lang.String key,
                  java.lang.Object obj)
           throws com.opensymphony.oscache.base.persistence.CachePersistenceException
Description copied from interface: com.opensymphony.oscache.base.persistence.PersistenceListener
Stores an object in the persistent cache.

Specified by:
store in interface com.opensymphony.oscache.base.persistence.PersistenceListener

storeGroup

public void storeGroup(java.lang.String groupName,
                       java.util.Set group)
                throws com.opensymphony.oscache.base.persistence.CachePersistenceException
Description copied from interface: com.opensymphony.oscache.base.persistence.PersistenceListener
Stores a group in the persistent cache.

Specified by:
storeGroup in interface com.opensymphony.oscache.base.persistence.PersistenceListener