org.openorb.pss.connector.memory

Class MemorySession

public class MemorySession extends MemoryCatalog implements Session, MemoryCatalogBase

This class is a simple implementation of file persistent session. Each persistent file contains several data wich are divided into 4 parts : - the VALID FLAG ( a boolean ) - the SHORT PID length ( a long value ) - the SHORT PID ( a buffer of bytes ) - the DATA length ( a long value ) - the DATA ( a buffer of bytes )

Author: Jerome Daniel

Constructor Summary
MemorySession()
MemorySession(ORBInitInfo info)
Constructor
Method Summary
voidclose()
PIDcreateHomePID(String storage_home_name)
Generate a Home PID
PIDcreatePID(PID home_pid, long index)
Generate a storage type PID
StorageObjectcreate_embedded_object(StorageHomeBase home_base, String storage_type_id)
This operation creates a new embedded storage type
StorageObjectcreate_object(StorageHomeBase home_base, String storage_type_id)
This operation creates a new storage type
voiddelete(PID home_pid, PID type_pid)
Delete a storage object
StorageHomeBasefind_home_base(PID pid)
Returns an storage object home from its PID ( high part is only used )
voidflush()
voidfree_all()
StorageObjectincarnate(StorageHomeBase home_base, byte[] storage_type_pid, String storage_type_id)
This operation returns a storage type incarnation
voidrefresh()
voidsetBaseInfo(MemoryConnector connector, short access, Parameter[] parameters)
Set the base information require by a catalog
booleanstored(PID home_pid, PID type_pid)
Look for a stored object

Constructor Detail

MemorySession

public MemorySession()

MemorySession

public MemorySession(ORBInitInfo info)
Constructor

Method Detail

close

public void close()

createHomePID

public PID createHomePID(String storage_home_name)
Generate a Home PID

createPID

public PID createPID(PID home_pid, long index)
Generate a storage type PID

create_embedded_object

public StorageObject create_embedded_object(StorageHomeBase home_base, String storage_type_id)
This operation creates a new embedded storage type

create_object

public StorageObject create_object(StorageHomeBase home_base, String storage_type_id)
This operation creates a new storage type

delete

public void delete(PID home_pid, PID type_pid)
Delete a storage object

find_home_base

public StorageHomeBase find_home_base(PID pid)
Returns an storage object home from its PID ( high part is only used )

flush

public void flush()

free_all

public void free_all()

incarnate

public StorageObject incarnate(StorageHomeBase home_base, byte[] storage_type_pid, String storage_type_id)
This operation returns a storage type incarnation

refresh

public void refresh()

setBaseInfo

public void setBaseInfo(MemoryConnector connector, short access, Parameter[] parameters)
Set the base information require by a catalog

stored

public boolean stored(PID home_pid, PID type_pid)
Look for a stored object