org.jgroups.persistence
Class FilePersistenceManager
public
class
FilePersistenceManager
extends Object
implements PersistenceManager
Author: Mandar Shinde
The class implements the PersistenceManager interface and provides users
a file based implementation when required.
The state of this class is current NOOP. Implementation will be in place
once a better structure for file based properties will be designed.
Method Summary |
void | clear()
Clears the complete NV state from the DB |
protected Map | filterLoadedValues(Map in) |
Serializable | remove(Serializable key)
Remove existing NV from being persisted |
Map | retrieveAll()
Gives back the Map in last known state |
void | save(Serializable key, Serializable val)
Save new NV pair as serializable objects or if already exist; store
new state |
void | saveAll(Map map)
Use to store a complete map into persistent state |
void | shutDown()
Used to handle shutdown call the PersistenceManager implementation.
|
public FilePersistenceManager(String propertiesFilename)
Default constructor
public void clear()
Clears the complete NV state from the DB
Throws: CannotRemoveException;
x
protected Map filterLoadedValues(Map in)
Turns the values into Floats to enable
DistributedHashtableDemo 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
public Serializable remove(Serializable key)
Remove existing NV from being persisted
public Map retrieveAll()
Gives back the Map in last known state
Returns: Map;
Throws: CannotRetrieveException;
public void save(Serializable key, Serializable val)
Save new NV pair as serializable objects or if already exist; store
new state
public void saveAll(Map map)
Use to store a complete map into persistent state
Throws: CannotPersistException;
public void shutDown()
Used to handle shutdown call the PersistenceManager implementation.
Persistent engines can leave this implementation empty.
Copyright ? 1998-2005 Bela Ban. All Rights Reserved.