|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.omg.CORBA.LocalObject
org.openorb.pss.connector.database.DatabaseCatalog
org.openorb.pss.connector.database.DatabaseSession
public class DatabaseSession
This class is an implementation of database persistent session.
| Constructor Summary | |
|---|---|
DatabaseSession()
Constructor without any parameter |
|
DatabaseSession(org.omg.PortableInterceptor.ORBInitInfo info)
Constructor |
|
| Method Summary | |
|---|---|
void |
close()
The operation close terminates the catalog. |
StorageObject |
create_embedded_object(StorageHomeBase home_base,
java.lang.String storage_type_id)
This operation is used to create an embedded storage type |
StorageObject |
create_empty_object(StorageHomeBase home_base,
java.lang.String storage_type_id)
This operation is used to create a storage type |
StorageObject |
create_object(StorageHomeBase home_base,
java.lang.String storage_type_id)
This operation is used to create a storage type |
PID |
createHomePID(java.lang.String storage_home_name)
Generate a Home PID |
PID |
createPID(PID home_pid,
long index)
Generate a storage type PID |
void |
destroy(StorageHomeBase home)
|
StorageHomeBase |
find_home_base(PID pid)
Returns an storage object home from its PID ( high part is only used ) |
PID[] |
find_pids(PID home_pid)
Returns all PIDs for this home |
PID |
find(PID home_pid,
KeyBag[] keys)
This operation is used to find a storage type |
void |
flush()
The flush operation instructs the PSS implementation to write to disk
any cached modifications of storage object incarnations managed by this catalog. |
void |
free_all()
The operation free_all instructs the catalog
implementation to set the reference count of all its PSDL storage object instances to 0. |
java.lang.String |
getParameter(java.lang.String parameter_name)
Return a parameter |
StorageObject |
incarnate(StorageHomeBase home_base,
byte[] storage_type_pid,
java.lang.String storage_type_id)
This operation is used to incarnate a storage type |
org.omg.CORBA.portable.InputStream[] |
read(PID home_pid,
PID type_pid,
int nb_members)
This operation is used to get a input access for a storagetype from the datastore |
void |
refresh()
A PSS implementation can cache data read from the datastore(s). |
void |
remove(PID home_pid,
PID type_pid)
This operation is used to delete a storage type |
void |
setBaseInfo(DatabaseConnector connector,
short access,
Parameter[] parameters)
Set the base information require by a catalog |
boolean |
stored(PID home_pid,
PID type_pid)
This operation is used to check if a storage type is already stored |
void |
write_entry_into_database(DatabaseEntry entry)
This operation is used to flush an entry into the database |
void |
write(PID home_pid,
PID type_pid,
org.omg.CORBA.portable.OutputStream[] output)
This operation is used to create a new entry into the datastore |
| Methods inherited from class org.openorb.pss.connector.database.DatabaseCatalog |
|---|
access_mode, clean, connector, find_all, find_by_pid, find_ref_by_pid, find_storage_home, iterator, parameters, setCatalogInfo |
| Methods inherited from class org.omg.CORBA.LocalObject |
|---|
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_interface, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_policy_override, validate_connection |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.omg.CosPersistentState.CatalogBaseOperations |
|---|
access_mode, find_by_pid, find_storage_home |
| Methods inherited from interface org.omg.CORBA.Object |
|---|
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override |
| Methods inherited from interface org.openorb.pss.connector.database.DatabaseCatalogBase |
|---|
connector, parameters |
| Constructor Detail |
|---|
public DatabaseSession()
public DatabaseSession(org.omg.PortableInterceptor.ORBInitInfo info)
| Method Detail |
|---|
public void setBaseInfo(DatabaseConnector connector,
short access,
Parameter[] parameters)
setBaseInfo in interface DatabaseCatalogBaseconnector - the database connectoraccess - the access modeparameters - parameters
java.lang.NullPointerException - if a supplier parameter is nullpublic PID createHomePID(java.lang.String storage_home_name)
public PID createPID(PID home_pid,
long index)
public void flush()
CatalogBaseOperationsflush operation instructs the PSS implementation to write to disk
any cached modifications of storage object incarnations managed by this catalog.
Often, when an application creates a new storage object or updates a storage object, the
modification is not written directly to disk -- the PSS implementation can cache some
dirty data.
flush in interface CatalogBaseOperationsflush in class DatabaseCatalogpublic void refresh()
CatalogBaseOperationsrefresh operation instructs the PSS implementation to refresh any cached storage
object incarnations accessed by this catalog. This operation can invalidate any direct
reference to a storage object incarnation?s data member.
refresh in interface CatalogBaseOperationsrefresh in class DatabaseCatalogpublic void free_all()
CatalogBaseOperationsfree_all instructs the catalog
implementation to set the reference count of all its PSDL storage object instances to 0.
In programming languages without garbage collection, such as C++, PSDL storage
object instances are reference-counted by the application. Further, when a PSDL
storage object A holds a reference to another PSDL storage object B, A?s instance
owns a reference count of B?s instance. When PSDL storage objects form a cyclic
graph, the corresponding instances own reference count of each other; even if the
programmer correctly releases all her reference counts, the cyclic graph will never be
completely released. The free_all operation deals with this problem.
free_all in interface CatalogBaseOperationsfree_all in class DatabaseCatalogpublic void close()
CatalogBaseOperationsclose terminates the catalog. When closed, the catalog is also flushed.
If the catalog is associated with one or more transactions when close is
called, these transactions are marked roll-back only.
close in interface CatalogBaseOperationsclose in class DatabaseCatalogpublic StorageHomeBase find_home_base(PID pid)
find_home_base in class DatabaseCatalogpublic java.lang.String getParameter(java.lang.String parameter_name)
public void destroy(StorageHomeBase home)
destroy in interface ExtendedCatalog
public boolean stored(PID home_pid,
PID type_pid)
stored in interface DatabaseCatalogBase
public org.omg.CORBA.portable.InputStream[] read(PID home_pid,
PID type_pid,
int nb_members)
throws NotFoundException
read in interface DatabaseCatalogBaseNotFoundException
public void write(PID home_pid,
PID type_pid,
org.omg.CORBA.portable.OutputStream[] output)
write in interface DatabaseCatalogBasepublic void write_entry_into_database(DatabaseEntry entry)
public void remove(PID home_pid,
PID type_pid)
remove in interface DatabaseCatalogBase
public PID find(PID home_pid,
KeyBag[] keys)
throws NotFoundException
find in interface DatabaseCatalogBaseNotFoundExceptionpublic PID[] find_pids(PID home_pid)
find_pids in class DatabaseCatalog
public StorageObject incarnate(StorageHomeBase home_base,
byte[] storage_type_pid,
java.lang.String storage_type_id)
throws NotFoundException
incarnate in interface DatabaseCatalogBaseNotFoundException
public StorageObject create_object(StorageHomeBase home_base,
java.lang.String storage_type_id)
create_object in interface DatabaseCatalogBase
public StorageObject create_empty_object(StorageHomeBase home_base,
java.lang.String storage_type_id)
create_empty_object in interface DatabaseCatalogBase
public StorageObject create_embedded_object(StorageHomeBase home_base,
java.lang.String storage_type_id)
create_embedded_object in interface DatabaseCatalogBase
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||