Class FilePersistenceManager
java.lang.Object
org.jgroups.persistence.FilePersistenceManager
- All Implemented Interfaces:
PersistenceManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the complete NV state from the DBprotected MapTurns the values into Floats to enableDistributedHashtableDemoto work.remove(Serializable key) Remove existing NV from being persistedGives back the Map in last known statevoidsave(Serializable key, Serializable val) Save new NV pair as serializable objects or if already exist; store new statevoidUse to store a complete map into persistent statevoidshutDown()Used to handle shutdown call the PersistenceManager implementation.
-
Constructor Details
-
FilePersistenceManager
-
-
Method Details
-
save
Save new NV pair as serializable objects or if already exist; store new state- Specified by:
savein interfacePersistenceManager- Parameters:
key-val-- Throws:
CannotPersistException
-
remove
Remove existing NV from being persisted- Specified by:
removein interfacePersistenceManager- Parameters:
key- value- Returns:
- Serializable; gives back the value
- Throws:
CannotRemoveException
-
saveAll
Use to store a complete map into persistent state- Specified by:
saveAllin interfacePersistenceManager- Parameters:
map-- Throws:
CannotPersistException
-
retrieveAll
Gives back the Map in last known state- Specified by:
retrieveAllin interfacePersistenceManager- Returns:
- Map;
- Throws:
CannotRetrieveException
-
filterLoadedValues
Turns the values into Floats to enableDistributedHashtableDemoto work. Subclasses should override this method to convert the incoming map of string/string key/value pairs into the types they want.- Parameters:
in-- Returns:
- Map
-
clear
Clears the complete NV state from the DB- Specified by:
clearin interfacePersistenceManager- Throws:
CannotRemoveException
-
shutDown
public void shutDown()Used to handle shutdown call the PersistenceManager implementation. Persistent engines can leave this implementation empty.- Specified by:
shutDownin interfacePersistenceManager
-