|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 Summary | |
void |
clear()
Clear the entire persistent cache (including the root) |
PersistenceListener |
configure(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. |
Method Detail |
public boolean isStored(java.lang.String key) throws CachePersistenceException
key
- The cache key of the object to check.
CachePersistenceException
public boolean isGroupStored(java.lang.String groupName) throws CachePersistenceException
groupName
- The name of the group to check.
CachePersistenceException
public void clear() throws CachePersistenceException
CachePersistenceException
public PersistenceListener configure(Config config)
public void remove(java.lang.String key) throws CachePersistenceException
CachePersistenceException
public void removeGroup(java.lang.String groupName) throws CachePersistenceException
groupName
- The name of the cache group to remove.
CachePersistenceException
public java.lang.Object retrieve(java.lang.String key) throws CachePersistenceException
key
- The unique cache key that maps to the object
being retrieved.
null
if no object was found
matching the supplied key.
CachePersistenceException
public void store(java.lang.String key, java.lang.Object obj) throws CachePersistenceException
key
- The key to uniquely identify this object.obj
- The object to persist. Most implementations
of this interface will require this object implements
Serializable
.
CachePersistenceException
public void storeGroup(java.lang.String groupName, java.util.Set group) throws CachePersistenceException
groupName
- The name of the group to persist.group
- A set containing the keys of all the CacheEntry
objects that belong to this group.
CachePersistenceException
public java.util.Set retrieveGroup(java.lang.String groupName) throws CachePersistenceException
groupName
- The name of the group to retrieve.
CacheEntry
objects that belong
to this group.
CachePersistenceException
|
See www.opensymphony.com for more information. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |