public class DBPersistenceManager extends Object implements PersistenceManager
| Constructor and Description |
|---|
DBPersistenceManager(InputStream input)
Duplicate constructor allowing inputstream
|
DBPersistenceManager(String filename)
Default construct
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the key-cache as well as all entries
|
protected void |
init(InputStream in)
used to initialize complete DB access.
|
Serializable |
remove(Serializable key)
Removes existing entry.
|
Map |
retrieveAll()
Used to retrieve the persisted map back to its last known state
|
void |
save(Serializable key,
Serializable val)
Saves NV pair as serializable object;
creates if new, stores new state if already exists.
|
void |
saveAll(Map map)
Saves all row entries for the map to DB.
|
void |
shutDown()
Shutting down the database cleanly
|
protected final Log log
public DBPersistenceManager(String filename) throws Exception
filename - absolute filepathException;Exceptionpublic DBPersistenceManager(InputStream input) throws Exception
input - Exceptionprotected void init(InputStream in) throws Exception
in - Exception;Exceptionpublic void save(Serializable key, Serializable val) throws CannotPersistException
save in interface PersistenceManagerkey - val - CannotPersistException;CannotPersistExceptionpublic Serializable remove(Serializable key) throws CannotRemoveException
remove in interface PersistenceManagerkey - CannotRemoveException;CannotRemoveExceptionpublic void saveAll(Map map) throws CannotPersistException
saveAll in interface PersistenceManagermap - CannotPersistException;CannotPersistExceptionpublic Map retrieveAll() throws CannotRetrieveException
retrieveAll in interface PersistenceManagerCannotRetrieveException;CannotRetrieveExceptionpublic void clear()
throws CannotRemoveException
clear in interface PersistenceManagerCannotRemoveException;CannotRemoveExceptionpublic void shutDown()
shutDown in interface PersistenceManagerCopyright © 2015 JBoss, a division of Red Hat. All rights reserved.