ch.systemsx.cisd.openbis.dss.generic.shared.content
Class SimpleFileBasePersistenceManager

java.lang.Object
  extended by ch.systemsx.cisd.openbis.dss.generic.shared.content.SimpleFileBasePersistenceManager
All Implemented Interfaces:
IPersistenceManager

public class SimpleFileBasePersistenceManager
extends java.lang.Object
implements IPersistenceManager

Simple implementation of IPersistenceManager using a file. Persistence request are processed immediately.


Constructor Summary
SimpleFileBasePersistenceManager(java.io.File file, java.lang.String nameOfObject)
          Creates an instance for the specified file storing the object.
 
Method Summary
 java.io.Serializable load(java.io.Serializable defaultObject)
          Loads and returns the persistent object.
 void requestPersistence()
          Requests for persisting the object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleFileBasePersistenceManager

public SimpleFileBasePersistenceManager(java.io.File file,
                                        java.lang.String nameOfObject)
Creates an instance for the specified file storing the object.

Parameters:
nameOfObject - Name of the object. Will be used in exception messages.
Method Detail

load

public java.io.Serializable load(java.io.Serializable defaultObject)
Description copied from interface: IPersistenceManager
Loads and returns the persistent object.

Specified by:
load in interface IPersistenceManager
Parameters:
defaultObject - will be returned if loading failed.

requestPersistence

public void requestPersistence()
Description copied from interface: IPersistenceManager
Requests for persisting the object. This can be done synchronously or asynchronously depending on the implementation.

Specified by:
requestPersistence in interface IPersistenceManager