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 void
clear()
Clears the complete NV state from the DBjava.io.Serializable
remove(java.io.Serializable key)
Remove existing NV from being persistedjava.util.Map
retrieveAll()
Gives back the Map in last known statevoid
save(java.io.Serializable key, java.io.Serializable val)
Save new NV pair as serializable objects or if already exist; store new statevoid
saveAll(java.util.Map map)
Use to store a complete map into persistent statevoid
shutDown()
Used to handle shutdown call the PersistenceManager implementation.
-
-
-
Method Detail
-
save
void save(java.io.Serializable key, java.io.Serializable val) throws CannotPersistException
Save 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 CannotRemoveException
Remove existing NV from being persisted- Parameters:
key
- value- Returns:
- Serializable; gives back the value
- Throws:
CannotRemoveException
-
saveAll
void saveAll(java.util.Map map) throws CannotPersistException
Use to store a complete map into persistent state- Parameters:
map
-- Throws:
CannotPersistException
-
retrieveAll
java.util.Map retrieveAll() throws CannotRetrieveException
Gives back the Map in last known state- Returns:
- Map;
- Throws:
CannotRetrieveException
-
clear
void clear() throws CannotRemoveException
Clears 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.
-
-