Class DBPersistenceManager
java.lang.Object
org.jgroups.persistence.DBPersistenceManager
- All Implemented Interfaces:
PersistenceManager
Class will be utilized
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDBPersistenceManager(InputStream input) Duplicate constructor allowing inputstreamDBPersistenceManager(String filename) Default construct -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the key-cache as well as all entriesprotected voidinit(InputStream in) used to intitiailize complete DB access.remove(Serializable key) Removes existing entry.Used to retrieve the persisted map back to its last known statevoidsave(Serializable key, Serializable val) Saves NV pair as serializable object; creates if new, stores new state if already exists.voidSaves all row entries for the map to DB.voidshutDown()Shutting down the database cleanly
-
Field Details
-
log
protected final org.apache.commons.logging.Log log
-
-
Constructor Details
-
DBPersistenceManager
-
DBPersistenceManager
Duplicate constructor allowing inputstream- Parameters:
input-- Throws:
Exception
-
-
Method Details
-
init
used to intitiailize complete DB access. THis method will use existing database to create schema (if it doesnt exist) and get PersistenceManager in usable condition- Parameters:
in-- Throws:
Exception
-
save
Saves NV pair as serializable object; creates if new, stores new state if already exists.- Specified by:
savein interfacePersistenceManager- Parameters:
key-val-- Throws:
CannotPersistException
-
remove
Removes existing entry.- Specified by:
removein interfacePersistenceManager- Parameters:
key-- Returns:
- Serializable; gives back the value
- Throws:
CannotRemoveException
-
saveAll
Saves all row entries for the map to DB.- Specified by:
saveAllin interfacePersistenceManager- Parameters:
map-- Throws:
CannotPersistException
-
retrieveAll
Used to retrieve the persisted map back to its last known state- Specified by:
retrieveAllin interfacePersistenceManager- Returns:
- Map;
- Throws:
CannotRetrieveException
-
clear
Clears the key-cache as well as all entries- Specified by:
clearin interfacePersistenceManager- Throws:
CannotRemoveException
-
shutDown
public void shutDown()Shutting down the database cleanly- Specified by:
shutDownin interfacePersistenceManager
-