|
||||||||
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
public abstract class DatabaseCatalog
This class is a catalog for persistent storage home.
Constructor Summary | |
---|---|
DatabaseCatalog()
Constructor |
Method Summary | |
---|---|
short |
access_mode()
The read-only attribute access_mode returns the access mode of this catalog. |
void |
clean(StorageHomeBase home)
|
abstract void |
close()
The operation close terminates the catalog. |
Connector |
connector()
Return the connector reference |
byte[][] |
find_all(StorageHomeBase home)
|
java.lang.Object |
find_by_pid(byte[] the_pid)
The find_by_pid operation attempts to locate a storage object
with the given PID in the storage homes provided by the target catalog. |
abstract StorageHomeBase |
find_home_base(PID pid)
Returns an storage object home from its PID ( high part is only used ) |
abstract PID[] |
find_pids(PID home_pid)
Returns all PIDs for this home |
StorageObjectRef |
find_ref_by_pid(byte[] the_pid)
|
StorageHomeBase |
find_storage_home(java.lang.String storage_home_id)
The find_storage_home operation can be used to obtain a storage home instance. |
abstract void |
flush()
The flush operation instructs the PSS implementation to write to disk
any cached modifications of storage object incarnations managed by this catalog. |
abstract 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. |
Iterator |
iterator(StorageHomeBase home)
|
Parameter[] |
parameters()
Return parameters |
abstract void |
refresh()
A PSS implementation can cache data read from the datastore(s). |
void |
setCatalogInfo(DatabaseConnector connector,
short access,
Parameter[] parameters)
Set catalog information |
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.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.ExtendedCatalog |
---|
destroy |
Constructor Detail |
---|
public DatabaseCatalog()
Method Detail |
---|
public Connector connector()
public void setCatalogInfo(DatabaseConnector connector, short access, Parameter[] parameters)
public short access_mode()
CatalogBaseOperations
access_mode
returns the access mode of this catalog.
When the access mode is READ_ONLY
, the storage object incarnations obtained
through storage home instances provided by this catalog are read-only.
access_mode
in interface CatalogBaseOperations
public Parameter[] parameters()
public StorageHomeBase find_storage_home(java.lang.String storage_home_id) throws NotFound
CatalogBaseOperations
find_storage_home
operation can be used to obtain a storage home instance.
find_storage_home
raises NotFound
if it cannot find a storage home that
matches the given storage_home_id
.
The format of the storage_home_id
parameter is mostly implementation-defined.
In the case of type-specific catalogs (declared in PSDL), the provide declarations
define valid storage_home_id
parameters. The find_storage_home
operation
also understands storage_home_id
that have the form of a PSDL type id.
find_storage_home
looks up a PSDL-defined storage home with this type id in
the catalog?s default datastore. If the storage_home_id
parameter has the form
":datastore_name", where datastore_name is a string, find_storage_home
returns
a storage home instance for the storage home associated with java.lang.Object
(Java)
in this datastore.
find_storage_home
in interface CatalogBaseOperations
NotFound
public java.lang.Object find_by_pid(byte[] the_pid) throws NotFound
CatalogBaseOperations
find_by_pid
operation attempts to locate a storage object
with the given PID in the storage homes provided by the target catalog.
find_by_pid
in interface CatalogBaseOperations
NotFound
- if it cannot find a storage object with this pid.public StorageObjectRef find_ref_by_pid(byte[] the_pid) throws NotFound
find_ref_by_pid
in interface ExtendedCatalog
NotFound
public byte[][] find_all(StorageHomeBase home)
find_all
in interface ExtendedCatalog
public Iterator iterator(StorageHomeBase home)
iterator
in interface ExtendedCatalog
public void clean(StorageHomeBase home)
clean
in interface ExtendedCatalog
public abstract void flush()
CatalogBaseOperations
flush
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 CatalogBaseOperations
public abstract void refresh()
CatalogBaseOperations
refresh
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 CatalogBaseOperations
public abstract void free_all()
CatalogBaseOperations
free_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 CatalogBaseOperations
public abstract void close()
CatalogBaseOperations
close
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 CatalogBaseOperations
public abstract StorageHomeBase find_home_base(PID pid)
public abstract PID[] find_pids(PID home_pid)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |