public class MapPersister extends PersisterBase
OddjobPersister.| Constructor and Description |
|---|
MapPersister()
Create a new instance with a standard
HashMap. |
MapPersister(Map<Path,Map<String,byte[]>> store)
Create a new instance with the provided map.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
clear(Path path)
Remove a possibly previously persisted object.
|
protected String[] |
list(Path path) |
protected void |
persist(Path path,
String id,
Object proxy)
Provided by subclasses to do the persisting.
|
protected void |
remove(Path path,
String id)
Remove a possibly previously persisted object.
|
protected Object |
restore(Path path,
String id,
ClassLoader classLoader)
Restore a previously persisted Component or it's Proxy.
|
String |
toString() |
persisterFor, setPathpublic MapPersister()
HashMap.protected void persist(Path path, String id, Object proxy)
PersisterBasepersist in class PersisterBasepath - The path as a string. Never null.id - The id. Never Null.proxy - The component or it's proxy.protected Object restore(Path path, String id, ClassLoader classLoader)
PersisterBaserestore in class PersisterBasepath - The path. Never Null.id - The id. Never Null.classLoader - The classLoader.protected String[] list(Path path) throws ComponentPersistException
list in class PersisterBaseComponentPersistExceptionprotected void remove(Path path, String id)
PersisterBaseremove in class PersisterBasepath - The path.id - The id.protected void clear(Path path)
PersisterBaseclear in class PersisterBasepath - The path.