Package org.jgroups.persistence
Interface PersistenceManager
-
- All Known Implementing Classes:
DBPersistenceManager,FilePersistenceManager
public interface PersistenceManager
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclear()Clears the complete NV state from the DBjava.io.Serializableremove(java.io.Serializable key)Remove existing NV from being persistedjava.util.MapretrieveAll()Gives back the Map in last known statevoidsave(java.io.Serializable key, java.io.Serializable val)Save new NV pair as serializable objects or if already exist; store new statevoidsaveAll(java.util.Map map)Use to store a complete map into persistent statevoidshutDown()Used to handle shutdown call the PersistenceManager implementation.
-
-
-
Method Detail
-
save
void save(java.io.Serializable key, java.io.Serializable val) throws CannotPersistExceptionSave new NV pair as serializable objects or if already exist; store new state- Parameters:
key-val-- Throws:
CannotPersistException
-
remove
java.io.Serializable remove(java.io.Serializable key) throws CannotRemoveExceptionRemove existing NV from being persisted- Parameters:
key- value- Returns:
- Serializable; gives back the value
- Throws:
CannotRemoveException
-
saveAll
void saveAll(java.util.Map map) throws CannotPersistExceptionUse to store a complete map into persistent state- Parameters:
map-- Throws:
CannotPersistException
-
retrieveAll
java.util.Map retrieveAll() throws CannotRetrieveExceptionGives back the Map in last known state- Returns:
- Map;
- Throws:
CannotRetrieveException
-
clear
void clear() throws CannotRemoveExceptionClears the complete NV state from the DB- Throws:
CannotRemoveException
-
shutDown
void shutDown()
Used to handle shutdown call the PersistenceManager implementation. Persistent engines can leave this implementation empty.
-
-