public class FilePersistenceManager extends Object implements PersistenceManager
Constructor and Description |
---|
FilePersistenceManager(String propertiesFilename)
Default constructor
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears the complete NV state from the DB
|
protected Map |
filterLoadedValues(Map in)
Turns the values into Floats to enable
org.jgroups.demos.DistributedHashtableDemo to work. |
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 void save(Serializable key, Serializable val) throws CannotPersistException
save
in interface PersistenceManager
CannotPersistException
public Serializable remove(Serializable key) throws CannotRemoveException
remove
in interface PersistenceManager
key
- valueCannotRemoveException
public void saveAll(Map map) throws CannotPersistException
saveAll
in interface PersistenceManager
CannotPersistException;
CannotPersistException
public Map retrieveAll() throws CannotRetrieveException
retrieveAll
in interface PersistenceManager
CannotRetrieveException;
CannotRetrieveException
protected Map filterLoadedValues(Map in)
org.jgroups.demos.DistributedHashtableDemo
to work.
Subclasses should override this method to convert the incoming map
of string/string key/value pairs into the types they want.in
- public void clear() throws CannotRemoveException
clear
in interface PersistenceManager
CannotRemoveException;
- xCannotRemoveException
public void shutDown()
shutDown
in interface PersistenceManager
Copyright © 2013 JBoss, a division of Red Hat. All Rights Reserved.