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 PersistenceManagerCannotPersistExceptionpublic Serializable remove(Serializable key) throws CannotRemoveException
remove in interface PersistenceManagerkey - valueCannotRemoveExceptionpublic void saveAll(Map map) throws CannotPersistException
saveAll in interface PersistenceManagerCannotPersistException;CannotPersistExceptionpublic Map retrieveAll() throws CannotRetrieveException
retrieveAll in interface PersistenceManagerCannotRetrieveException;CannotRetrieveExceptionprotected 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 PersistenceManagerCannotRemoveException; - xCannotRemoveExceptionpublic void shutDown()
shutDown in interface PersistenceManagerCopyright © 2015 JBoss, a division of Red Hat. All rights reserved.