Package org.oddjob.persist
Class MapPersister
java.lang.Object
org.oddjob.persist.PersisterBase
org.oddjob.persist.MapPersister
- All Implemented Interfaces:
OddjobPersister
A Memory based
OddjobPersister.- Author:
- rob
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidRemove a possibly previously persisted object.protected String[]protected voidProvided by subclasses to do the persisting.protected voidRemove a possibly previously persisted object.protected Objectrestore(Path path, String id, ClassLoader classLoader) Restore a previously persisted Component or it's Proxy.toString()Methods inherited from class org.oddjob.persist.PersisterBase
persisterFor, setPath
-
Constructor Details
-
MapPersister
public MapPersister()Create a new instance with a standardHashMap. -
MapPersister
Create a new instance with the provided map. Access to this map will be synchronized so the map itself need not be.- Parameters:
store- A Map. Must not be null.
-
-
Method Details
-
persist
Description copied from class:PersisterBaseProvided by subclasses to do the persisting.- Specified by:
persistin classPersisterBase- Parameters:
path- The path as a string. Never null.id- The id. Never Null.proxy- The component or it's proxy.
-
restore
Description copied from class:PersisterBaseRestore a previously persisted Component or it's Proxy.- Specified by:
restorein classPersisterBase- Parameters:
path- The path. Never Null.id- The id. Never Null.classLoader- The classLoader.- Returns:
- The component or it's proxy. Null if nothing had previously been persisted for this path and id.
-
list
- Specified by:
listin classPersisterBase- Throws:
ComponentPersistException
-
remove
Description copied from class:PersisterBaseRemove a possibly previously persisted object.- Specified by:
removein classPersisterBase- Parameters:
path- The path.id- The id.
-
clear
Description copied from class:PersisterBaseRemove a possibly previously persisted object.- Specified by:
clearin classPersisterBase- Parameters:
path- The path.
-
toString
-