public class FilePersistenceManager extends java.lang.Object implements PersistenceManager
| Constructor and Description |
|---|
FilePersistenceManager(java.lang.String propertiesFilename)
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the complete NV state from the DB
|
protected java.util.Map |
filterLoadedValues(java.util.Map in)
Turns the values into Floats to enable
DistributedHashtableDemo to work. |
java.io.Serializable |
remove(java.io.Serializable key)
Remove existing NV from being persisted
|
java.util.Map |
retrieveAll()
Gives back the Map in last known state
|
void |
save(java.io.Serializable key,
java.io.Serializable val)
Save new NV pair as serializable objects or if already exist; store
new state
|
void |
saveAll(java.util.Map map)
Use to store a complete map into persistent state
|
void |
shutDown()
Used to handle shutdown call the PersistenceManager implementation.
|
public FilePersistenceManager(java.lang.String propertiesFilename)
throws java.lang.Exception
java.lang.Exceptionpublic void save(java.io.Serializable key,
java.io.Serializable val)
throws CannotPersistException
save in interface PersistenceManagerCannotPersistExceptionpublic java.io.Serializable remove(java.io.Serializable key)
throws CannotRemoveException
remove in interface PersistenceManagerkey - valueCannotRemoveExceptionpublic void saveAll(java.util.Map map)
throws CannotPersistException
saveAll in interface PersistenceManagerCannotPersistException;CannotPersistExceptionpublic java.util.Map retrieveAll()
throws CannotRetrieveException
retrieveAll in interface PersistenceManagerCannotRetrieveException;CannotRetrieveExceptionprotected java.util.Map filterLoadedValues(java.util.Map in)
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 ? 1998-2008 Bela Ban. All Rights Reserved.