org.openorb.pss.connector.memory
Class MemoryCatalog

java.lang.Object
  extended by org.omg.CORBA.LocalObject
      extended by org.openorb.pss.connector.memory.MemoryCatalog
All Implemented Interfaces:
java.io.Serializable, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity, CatalogBase, CatalogBaseOperations, ExtendedCatalog
Direct Known Subclasses:
MemorySession

public abstract class MemoryCatalog
extends org.omg.CORBA.LocalObject
implements CatalogBase, ExtendedCatalog

This class is a catalog for persistent storage home.

Author:
Jerome Daniel
See Also:
Serialized Form

Constructor Summary
MemoryCatalog()
          Constructor without any parameter
MemoryCatalog(org.omg.PortableInterceptor.ORBInitInfo info)
          Constructor
 
Method Summary
 short access_mode()
          The read-only attribute access_mode returns the access mode of this catalog.
 void clean(StorageHomeBase home)
           
 Connector connector()
          Return the connector reference
 void destroy(StorageHomeBase home)
           
 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 )
 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.
 Iterator iterator(StorageHomeBase home)
           
 Parameter[] parameters()
          Return parameters
 void setCatalogInfo(MemoryConnector 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.CosPersistentState.CatalogBaseOperations
close, flush, free_all, refresh
 
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
 

Constructor Detail

MemoryCatalog

public MemoryCatalog()
Constructor without any parameter


MemoryCatalog

public MemoryCatalog(org.omg.PortableInterceptor.ORBInitInfo info)
Constructor

Method Detail

connector

public Connector connector()
Return the connector reference


setCatalogInfo

public void setCatalogInfo(MemoryConnector connector,
                           short access,
                           Parameter[] parameters)
Set catalog information


access_mode

public short access_mode()
Description copied from interface: CatalogBaseOperations
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.

Specified by:
access_mode in interface CatalogBaseOperations

parameters

public Parameter[] parameters()
Return parameters


find_storage_home

public StorageHomeBase find_storage_home(java.lang.String storage_home_id)
                                  throws NotFound
Description copied from interface: CatalogBaseOperations
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.

Specified by:
find_storage_home in interface CatalogBaseOperations
Throws:
NotFound

find_by_pid

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

Specified by:
find_by_pid in interface CatalogBaseOperations
Returns:
StorageObjectBase an incarnation of this storage object
Throws:
NotFound - if it cannot find a storage object with this pid.

find_ref_by_pid

public StorageObjectRef find_ref_by_pid(byte[] the_pid)
                                 throws NotFound
Specified by:
find_ref_by_pid in interface ExtendedCatalog
Throws:
NotFound

find_all

public byte[][] find_all(StorageHomeBase home)
Specified by:
find_all in interface ExtendedCatalog

iterator

public Iterator iterator(StorageHomeBase home)
Specified by:
iterator in interface ExtendedCatalog

clean

public void clean(StorageHomeBase home)
Specified by:
clean in interface ExtendedCatalog

destroy

public void destroy(StorageHomeBase home)
Specified by:
destroy in interface ExtendedCatalog

find_home_base

public abstract StorageHomeBase find_home_base(PID pid)
Returns an storage object home from its PID ( high part is only used )