Package org.jgroups.persistence
Class FilePersistenceManager
java.lang.Object
org.jgroups.persistence.FilePersistenceManager
- All Implemented Interfaces:
PersistenceManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clears the complete NV state from the DBprotected Map
Turns the values into Floats to enableDistributedHashtableDemo
to work.remove
(Serializable key) Remove existing NV from being persistedGives back the Map in last known statevoid
save
(Serializable key, Serializable val) Save new NV pair as serializable objects or if already exist; store new statevoid
Use to store a complete map into persistent statevoid
shutDown()
Used to handle shutdown call the PersistenceManager implementation.
-
Constructor Details
-
FilePersistenceManager
Default constructor- Throws:
Exception
-
-
Method Details
-
save
Save new NV pair as serializable objects or if already exist; store new state- Specified by:
save
in interfacePersistenceManager
- Parameters:
key
-val
-- Throws:
CannotPersistException
-
remove
Remove existing NV from being persisted- Specified by:
remove
in interfacePersistenceManager
- Parameters:
key
- value- Returns:
- Serializable; gives back the value
- Throws:
CannotRemoveException
-
saveAll
Use to store a complete map into persistent state- Specified by:
saveAll
in interfacePersistenceManager
- Parameters:
map
-- Throws:
CannotPersistException
-
retrieveAll
Gives back the Map in last known state- Specified by:
retrieveAll
in interfacePersistenceManager
- Returns:
- Map;
- Throws:
CannotRetrieveException
-
filterLoadedValues
Turns the values into Floats to enableDistributedHashtableDemo
to 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:
clear
in interfacePersistenceManager
- Throws:
CannotRemoveException
-
shutDown
public void shutDown()Used to handle shutdown call the PersistenceManager implementation. Persistent engines can leave this implementation empty.- Specified by:
shutDown
in interfacePersistenceManager
-