org.jgroups.persistence
Interface PersistenceManager
public
interface
PersistenceManager
Author: Mandar Shinde
This interface defines the interface that needs to be implemented to
persist any Map(Serializable) object. Primary usage would be users who
need to store the state of a given NV for fault tolerance.
| Method Summary |
| void | clear()
Clears the complete NV state from the DB |
| Serializable | remove(Serializable key)
Remove existing NV from being persisted |
| Map | retrieveAll()
Gives back the Map in last known state |
| void | save(Serializable key, Serializable val)
Save new NV pair as serializable objects or if already exist; store
new state |
| void | saveAll(Map map)
Use to store a complete map into persistent state |
| void | shutDown()
Used to handle shutdown call the PersistenceManager implementation.
|
public void clear()
Clears the complete NV state from the DB
Throws: CannotRemoveException;
public Serializable remove(Serializable key)
Remove existing NV from being persisted
Parameters: key value
Returns: Serializable; gives back the value
Throws: CannotRemoveException;
public Map retrieveAll()
Gives back the Map in last known state
Returns: Map;
Throws: CannotRetrieveException;
public void save(Serializable key, Serializable val)
Save new NV pair as serializable objects or if already exist; store
new state
Parameters: key val
Throws: CannotPersistException;
public void saveAll(Map map)
Use to store a complete map into persistent state
Parameters: map
Throws: CannotPersistException;
public void shutDown()
Used to handle shutdown call the PersistenceManager implementation.
Persistent engines can leave this implementation empty.
Copyright ? 1998-2005 Bela Ban. All Rights Reserved.