|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CatalogBaseOperations
Interface definition: CatalogBase.
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 |
---|
short access_mode()
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.
StorageHomeBase find_storage_home(java.lang.String storage_home_id) throws NotFound
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.
NotFound
java.lang.Object find_by_pid(byte[] the_pid) throws NotFound
find_by_pid
operation attempts to locate a storage object
with the given PID in the storage homes provided by the target catalog.
NotFound
- if it cannot find a storage object with this pid.void flush()
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.
void refresh()
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.
void free_all()
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.
void close()
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.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |