org.openorb.pss.connector.file
Class FileSession
public
class
FileSession
extends FileCatalog
implements Session
This class is an implementation of file based 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
Method Summary |
void | clean(StorageHomeBase home) |
void | close() |
PID | createHomePID(String storage_home_name)
Generate a Home PID |
PID | createPID(PID home_pid, long index)
Generate a storage type PID |
StorageObject | create_embedded_object(StorageHomeBase home_base, String storage_type_id)
This operation creates a new embedded storage type |
StorageObject | create_empty_object(StorageHomeBase home_base, String storage_type_id)
This operation creates a new storage type |
OutputStream | create_new_entry(PID home_pid, PID type_pid)
Create a new entry |
StorageObject | create_object(StorageHomeBase home_base, String storage_type_id)
This operation creates a new storage type |
void | delete(PID home_pid, PID type_pid)
Delete a storage object |
void | destroy(StorageHomeBase home) |
InputStream | entry(PID home_pid, PID type_pid)
Return the entry data as an input stream |
void | entry(PID home_pid, PID type_pid, OutputStream output)
Write a new entry into the file. |
StorageHomeBase | find_home_base(PID pid)
Returns an storage object home from its PID ( high part is only used ) |
void | flush() |
void | free_all() |
DataManager | getDataManager(String storage_home_name)
This operation return the DataManager |
Enumeration | getSequentialAccess(PID home_pid)
Returns a sequential access for all storage home's storage type |
StorageObject | incarnate(StorageHomeBase home_base, byte[] storage_type_pid, String storage_type_id)
This operation returns a storage type incarnation |
void | refresh() |
void | setBaseInfo(FileConnector connector, short access, Parameter[] parameters)
Set the base information require by a catalog |
boolean | stored(PID home_pid, PID type_pid)
Look for a stored object |
void | write_entry(DataManager manager, DataEntry entry)
Write the entry to the data store ( this operation could be overloaded if required - no access to private data - ) |
public FileSession()
public FileSession(ORBInitInfo info)
Constructor
public void clean(StorageHomeBase home)
public void close()
public
PID createHomePID(String storage_home_name)
Generate a Home PID
public
PID createPID(
PID home_pid, long index)
Generate a storage type PID
public
StorageObject create_embedded_object(StorageHomeBase home_base, String storage_type_id)
This operation creates a new embedded storage type
public
StorageObject create_empty_object(StorageHomeBase home_base, String storage_type_id)
This operation creates a new storage type
public OutputStream create_new_entry(
PID home_pid,
PID type_pid)
Create a new entry
public
StorageObject create_object(StorageHomeBase home_base, String storage_type_id)
This operation creates a new storage type
public void delete(
PID home_pid,
PID type_pid)
Delete a storage object
public void destroy(StorageHomeBase home)
public InputStream entry(
PID home_pid,
PID type_pid)
Return the entry data as an input stream
public void entry(
PID home_pid,
PID type_pid, OutputStream output)
Write a new entry into the file.
public StorageHomeBase find_home_base(
PID pid)
Returns an storage object home from its PID ( high part is only used )
public void flush()
public void free_all()
public
DataManager getDataManager(String storage_home_name)
This operation return the DataManager
public Enumeration getSequentialAccess(
PID home_pid)
Returns a sequential access for all storage home's storage type
public
StorageObject incarnate(StorageHomeBase home_base, byte[] storage_type_pid, String storage_type_id)
This operation returns a storage type incarnation
public void refresh()
public void setBaseInfo(
FileConnector connector, short access, Parameter[] parameters)
Set the base information require by a catalog
public boolean stored(
PID home_pid,
PID type_pid)
Look for a stored object
Write the entry to the data store ( this operation could be overloaded if required - no access to private data - )