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
Object
export(ConnectionHolder context, Object obj)
Makes persitent an object.
Object
export(ConnectionHolder context, Object obj, Object hints)
Makes persitent an object.
void
read(ConnectionHolder context, Object oid, State state)
Reads data of a persistent from the support object and puts them into an instance.
void
read(WorkingSet context, Object oid, State state)
Reads data of a persistent from the support object and puts them into an instance.
void
unexport(ConnectionHolder context, Object oid)
Destroyes a persistent object
void
unexport(ConnectionHolder context, Object oid, Object hints)
Destroyes a persistent object
void
write(ConnectionHolder context, Object oid, State state)
Reads data of a persistent from the support object and puts them into an instance.

Method Details

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


export

public Object export(ConnectionHolder context,
                     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 Object export(ConnectionHolder context,
                     Object obj,
                     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 -


read

public void read(ConnectionHolder context,
                 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


read

public void read(WorkingSet context,
                 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


unexport

public void unexport(ConnectionHolder context,
                     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,
                     Object oid,
                     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 -


write

public void write(ConnectionHolder context,
                  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


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