org.objectweb.perseus.persistence.api
Interface StorageManager


public interface StorageManager

It defines a manager permiting to manage a persitent object.

Author:
Luciano Garcia-Banuelos (Luciano.Garcia@imag.fr)

Method Summary
 void beginWS(WorkingSet ws)
          Informes the Storage manager of the begining of a working set
 void endWS(WorkingSet ws)
          Informes the Storage manager of the end of a working set
 java.lang.Object export(ConnectionHolder context, java.lang.Object obj)
          Makes persitent an object.
 java.lang.Object export(ConnectionHolder context, java.lang.Object obj, java.lang.Object hints)
          Makes persitent an object.
 void read(ConnectionHolder context, java.lang.Object oid, State state)
          Reads data of a persistent from the support object and puts them into an instance.
 void read(WorkingSet context, java.lang.Object oid, State state)
          Reads data of a persistent from the support object and puts them into an instance.
 void unexport(ConnectionHolder context, java.lang.Object oid)
          Destroyes a persistent object
 void unexport(ConnectionHolder context, java.lang.Object oid, java.lang.Object hints)
          Destroyes a persistent object
 void write(ConnectionHolder context, java.lang.Object oid, State state)
          Reads data of a persistent from the support object and puts them into an instance.
 

Method Detail

export

public java.lang.Object export(ConnectionHolder context,
                               java.lang.Object obj)
                        throws PersistenceException
Makes persitent an object.

Parameters:
context - permits to access to the data support.
obj - is the exported persistent object
Returns:
the identifier of the persistent object.
Throws:
PersistenceException

export

public java.lang.Object export(ConnectionHolder context,
                               java.lang.Object obj,
                               java.lang.Object hints)
                        throws PersistenceException
Makes persitent an object.

Parameters:
context - permits to access to the data support.
obj - is the exported persistent object
hints - helps to define the name of the persistent object.
Returns:
the identifier of the persistent object.
Throws:
PersistenceException

unexport

public void unexport(ConnectionHolder context,
                     java.lang.Object oid)
              throws PersistenceException
Destroyes a persistent object

Parameters:
context - permits to access to the data support.
oid - is the object identifier of the removed persistent object.
Throws:
PersistenceException

unexport

public void unexport(ConnectionHolder context,
                     java.lang.Object oid,
                     java.lang.Object hints)
              throws PersistenceException
Destroyes a persistent object

Parameters:
context - permits to access to the data support.
oid - is the object identifier of the removed persistent object.
hints - helps to remove the persistent object.
Throws:
PersistenceException

read

public void read(ConnectionHolder context,
                 java.lang.Object oid,
                 State state)
          throws PersistenceException
Reads data of a persistent from the support object and puts them into an instance.

Parameters:
context - permits to access to the data support.
oid - is the identifier of the persistent object
state - is an instance of a persistent object which must be filled by the data read from the support
Throws:
PersistenceException

read

public void read(WorkingSet context,
                 java.lang.Object oid,
                 State state)
          throws PersistenceException
Reads data of a persistent from the support object and puts them into an instance.

Parameters:
context - permits to access to the data support and to manage a prefetching context.
oid - is the identifier of the persistent object
state - is an instance of a persistent object which must be filled by the data read from the support
Throws:
PersistenceException

write

public void write(ConnectionHolder context,
                  java.lang.Object oid,
                  State state)
           throws PersistenceException
Reads data of a persistent from the support object and puts them into an instance.

Parameters:
context - permits to access to the data support.
oid - is the identifier of the persistent object
state - the the persistent object instance which contains the data which must be written in the support
Throws:
PersistenceException

beginWS

public void beginWS(WorkingSet ws)
Informes the Storage manager of the begining of a working set

Parameters:
ws - the working set which starts

endWS

public void endWS(WorkingSet ws)
Informes the Storage manager of the end of a working set

Parameters:
ws - the working set which finishes


Copyright © 2000-2002 France Telecom S.A., INRIA, IMAG-LSR All Rights Reserved.