org.omg.CosPersistentState
Interface CatalogBaseOperations

All Known Subinterfaces:
CatalogBase, DatabaseCatalogBase, FileCatalogBase, MemoryCatalogBase, Session, SessionOperations, SessionPool, SessionPoolOperations, TransactionalSession, TransactionalSessionOperations
All Known Implementing Classes:
DatabaseCatalog, DatabaseSession, DatabaseSessionPool, FileCatalog, FileSession, FileSessionPool, MemoryCatalog, MemorySession, MemorySessionPool, TransactionalDatabaseSession, TransactionalFileSession, TransactionalMemorySession

public interface CatalogBaseOperations

Interface definition: CatalogBase.

Author:
OpenORB Compiler

Method Summary
 short access_mode()
          The read-only attribute access_mode returns the access mode of this catalog.
 void close()
          The operation close terminates the catalog.
 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.
 StorageHomeBase find_storage_home(java.lang.String storage_home_id)
          The find_storage_home operation can be used to obtain a storage home instance.
 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.
 void refresh()
          A PSS implementation can cache data read from the datastore(s).
 

Method Detail

access_mode

short access_mode()
The read-only attribute 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.


find_storage_home

StorageHomeBase find_storage_home(java.lang.String storage_home_id)
                                  throws NotFound
The 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.

Throws:
NotFound

find_by_pid

java.lang.Object find_by_pid(byte[] the_pid)
                             throws NotFound
The find_by_pid operation attempts to locate a storage object with the given PID in the storage homes provided by the target catalog.

Returns:
StorageObjectBase an incarnation of this storage object
Throws:
NotFound - if it cannot find a storage object with this pid.

flush

void flush()
The 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.


refresh

void refresh()
A PSS implementation can cache data read from the datastore(s). The 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.


free_all

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. 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.


close

void close()
The operation 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.