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
voidclear()
Clears the complete NV state from the DB
Serializableremove(Serializable key)
Remove existing NV from being persisted
MapretrieveAll()
Gives back the Map in last known state
voidsave(Serializable key, Serializable val)
Save new NV pair as serializable objects or if already exist; store new state
voidsaveAll(Map map)
Use to store a complete map into persistent state
voidshutDown()
Used to handle shutdown call the PersistenceManager implementation.

Method Detail

clear

public void clear()
Clears the complete NV state from the DB

Throws: CannotRemoveException;

remove

public Serializable remove(Serializable key)
Remove existing NV from being persisted

Parameters: key value

Returns: Serializable; gives back the value

Throws: CannotRemoveException;

retrieveAll

public Map retrieveAll()
Gives back the Map in last known state

Returns: Map;

Throws: CannotRetrieveException;

save

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;

saveAll

public void saveAll(Map map)
Use to store a complete map into persistent state

Parameters: map

Throws: CannotPersistException;

shutDown

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.