org.jgroups.persistence

Interface PersistenceManager

Known Implementing Classes:
DBPersistenceManager, FilePersistenceManager

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.

Method Details

clear

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

remove

public Serializable remove(Serializable key)
            throws CannotRemoveException
Remove existing NV from being persisted
Parameters:
key - value
Returns:
Serializable; gives back the value

retrieveAll

public Map retrieveAll()
            throws CannotRetrieveException
Gives back the Map in last known state
Returns:
Map;

save

public void save(Serializable key,
                 Serializable val)
            throws CannotPersistException
Save new NV pair as serializable objects or if already exist; store new state
Parameters:
key -
val -

saveAll

public void saveAll(Map map)
            throws CannotPersistException
Use to store a complete map into persistent state
Parameters:
map -

shutDown

public void shutDown()
Used to handle shutdown call the PersistenceManager implementation. Persistent engines can leave this implementation empty.

Copyright B) 1998-2005 Bela Ban. All Rights Reserved.