Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

CdbBdbSRegistryP Class Reference

A base class for the "Registry"-s of specific types of databases. More...

Inheritance diagram for CdbBdbSRegistryP:

BdbPersObj CdbBdbSMasterRegistryP CdbBdbSSlaveRegistryP CdbBdbSTestRegistryP List of all members.

Public Member Functions

virtual ~CdbBdbSRegistryP ()
 Destructor.

d_UShort originId () const
 ooString (32) description() const
BdbTime created () const
BdbTime id () const
bool hasLocalCollections () const
virtual bool isMaster () const=0
 Check if it's the master.

virtual BdbRef (CdbBdbSOriginCollectionP) originCollection() const=0
virtual BdbRef (CdbBdbSPartitionsLayoutP) partitionsLayout() const=0
virtual BdbRef (CdbBdbSClusterCollectionP) pClusterCollection() const=0
virtual BdbRef (CdbBdbSRallocatorP< d_UShort >) originRallocator() const=0
virtual BdbRef (CdbBdbSRallocatorP< d_UShort >) partitionRallocator() const=0
virtual BdbRef (CdbBdbSRallocatorP< d_UShort >) pClusterRallocator() const=0
 BdbRef (CdbBdbSConditionCollectionP) conditionCollection() const
 BdbRef (CdbBdbSViewCollectionP) viewCollection() const
 BdbRef (CdbBdbSClusterCollectionP) clusterCollection() const
 BdbRef (CdbBdbSRallocatorP< d_UShort >) conditionRallocator() const
 BdbRef (CdbBdbSRallocatorP< d_UShort >) viewRallocator() const
 BdbRef (CdbBdbSRallocatorP< d_UShort >) clusterRallocator() const
virtual void dump (std::ostream &o) const
 Dump the contents of the object.

CdbStatus updateMainView ()
 Update the contents of the main view.


Static Public Member Functions

const char * defaultDbIdRange ()
 Default DBID range name.

CdbStatus findMaster (BdbHandle(CdbBdbSRegistryP)&theRegistryH, const BdbMode theOpenMode=BdbcRead)
 Static locator for the MASTER registry.

CdbStatus findLocal (BdbHandle(CdbBdbSRegistryP)&theRegistryH, const BdbMode theOpenMode=BdbcRead)
 Static locator for the local registry.

CdbStatus findByOrigin (BdbHandle(CdbBdbSRegistryP)&theRegistryH, d_UShort theOriginId, const BdbMode theOpenMode=BdbcRead)
 Static locator for a registry corresponding to specified origin ID.

CdbStatus findByOrigin (BdbHandle(CdbBdbSRegistryP)&theRegistryH, const char *theOriginName, const BdbMode theOpenMode=BdbcRead)
 Static locator for a registry corresponding to specified origin name.


Protected Member Functions

 CdbBdbSRegistryP (d_UShort theOriginId, const char *theDescription, const BdbTime &theCreationTime, const BdbTime &theId, bool hasLocalCollectionsFlag)
 Normal constructor.


Detailed Description

A base class for the "Registry"-s of specific types of databases.

This is an abstract class to be extended & implemented by concrete subclasses.

Definition at line 23 of file CdbBdbSRegistryP.ddl.


Constructor & Destructor Documentation

CdbBdbSRegistryP::CdbBdbSRegistryP d_UShort    theOriginId,
const char *    theDescription,
const BdbTime   theCreationTime,
const BdbTime   theId,
bool    hasLocalCollectionsFlag
[protected]
 

Normal constructor.

The "id" of the MASTER database is the same as its creation time. The local collections get created only if the corresponding flag is set up.

Parameters:
theOriginId  the origin identifier of this part
theDescription  the description of the database
theCreationTime  the time when the database is supposed to be created
theId  the unique identifier of the whole Condition/DB database
hasLocalCollectionsFlag  the flag

Definition at line 40 of file CdbBdbSRegistryP.cc.

References BdbRef(), CdbBdbSClusterCollectionP, and CdbBdbSConditionCollectionP.

CdbBdbSRegistryP::~CdbBdbSRegistryP   [virtual]
 

Destructor.

Definition at line 171 of file CdbBdbSRegistryP.cc.


Member Function Documentation

CdbBdbSRegistryP::BdbRef CdbBdbSRallocatorP< d_UShort >    const
 

Reimplemented in CdbBdbSMasterRegistryP, CdbBdbSMasterRegistryP, CdbBdbSMasterRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSTestRegistryP, CdbBdbSTestRegistryP, and CdbBdbSTestRegistryP.

CdbBdbSRegistryP::BdbRef CdbBdbSRallocatorP< d_UShort >    const
 

Reimplemented in CdbBdbSMasterRegistryP, CdbBdbSMasterRegistryP, CdbBdbSMasterRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSTestRegistryP, CdbBdbSTestRegistryP, and CdbBdbSTestRegistryP.

CdbBdbSRegistryP::BdbRef CdbBdbSRallocatorP< d_UShort >    const
 

Reimplemented in CdbBdbSMasterRegistryP, CdbBdbSMasterRegistryP, CdbBdbSMasterRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSTestRegistryP, CdbBdbSTestRegistryP, and CdbBdbSTestRegistryP.

CdbBdbSRegistryP::BdbRef CdbBdbSClusterCollectionP    const
 

Reimplemented in CdbBdbSMasterRegistryP, CdbBdbSMasterRegistryP, CdbBdbSMasterRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSTestRegistryP, CdbBdbSTestRegistryP, and CdbBdbSTestRegistryP.

CdbBdbSRegistryP::BdbRef CdbBdbSViewCollectionP    const
 

Reimplemented in CdbBdbSMasterRegistryP, CdbBdbSMasterRegistryP, CdbBdbSMasterRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSTestRegistryP, CdbBdbSTestRegistryP, and CdbBdbSTestRegistryP.

CdbBdbSRegistryP::BdbRef CdbBdbSConditionCollectionP    const
 

Reimplemented in CdbBdbSMasterRegistryP, CdbBdbSMasterRegistryP, CdbBdbSMasterRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSTestRegistryP, CdbBdbSTestRegistryP, and CdbBdbSTestRegistryP.

virtual CdbBdbSRegistryP::BdbRef CdbBdbSRallocatorP< d_UShort >    const [pure virtual]
 

Implemented in CdbBdbSMasterRegistryP, CdbBdbSMasterRegistryP, CdbBdbSMasterRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSTestRegistryP, CdbBdbSTestRegistryP, and CdbBdbSTestRegistryP.

virtual CdbBdbSRegistryP::BdbRef CdbBdbSRallocatorP< d_UShort >    const [pure virtual]
 

Implemented in CdbBdbSMasterRegistryP, CdbBdbSMasterRegistryP, CdbBdbSMasterRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSTestRegistryP, CdbBdbSTestRegistryP, and CdbBdbSTestRegistryP.

virtual CdbBdbSRegistryP::BdbRef CdbBdbSRallocatorP< d_UShort >    const [pure virtual]
 

Implemented in CdbBdbSMasterRegistryP, CdbBdbSMasterRegistryP, CdbBdbSMasterRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSTestRegistryP, CdbBdbSTestRegistryP, and CdbBdbSTestRegistryP.

virtual CdbBdbSRegistryP::BdbRef CdbBdbSClusterCollectionP    const [pure virtual]
 

Implemented in CdbBdbSMasterRegistryP, CdbBdbSMasterRegistryP, CdbBdbSMasterRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSTestRegistryP, CdbBdbSTestRegistryP, and CdbBdbSTestRegistryP.

virtual CdbBdbSRegistryP::BdbRef CdbBdbSPartitionsLayoutP    const [pure virtual]
 

Implemented in CdbBdbSMasterRegistryP, CdbBdbSMasterRegistryP, CdbBdbSMasterRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSTestRegistryP, CdbBdbSTestRegistryP, and CdbBdbSTestRegistryP.

virtual CdbBdbSRegistryP::BdbRef CdbBdbSOriginCollectionP    const [pure virtual]
 

Implemented in CdbBdbSMasterRegistryP, CdbBdbSMasterRegistryP, CdbBdbSMasterRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSSlaveRegistryP, CdbBdbSTestRegistryP, CdbBdbSTestRegistryP, and CdbBdbSTestRegistryP.

Referenced by CdbBdbSRegistryP(), findByOrigin(), findLocal(), and updateMainView().

BdbTime CdbBdbSRegistryP::created   const
 

Definition at line 201 of file CdbBdbSRegistryP.cc.

const char * CdbBdbSRegistryP::defaultDbIdRange   [static]
 

Default DBID range name.

The DBID range whose name is returned by this static method is prohibited from using in MASTER and SLAVE databases, but it should be used in TEST kinds of databases.

Definition at line 183 of file CdbBdbSRegistryP.cc.

Referenced by CdbBdbSMasterRegistryP::CdbBdbSMasterRegistryP(), CdbBdbSSlaveRegistryP::CdbBdbSSlaveRegistryP(), CdbBdbSTestRegistryP::CdbBdbSTestRegistryP(), CdbBdbSTestRegistryP::create(), CdbBdbSSlaveRegistryP::create(), and CdbBdbSMasterRegistryP::create().

void CdbBdbSRegistryP::dump std::ostream &    o const [virtual]
 

Dump the contents of the object.

Definition at line 255 of file CdbBdbSRegistryP.cc.

References isMaster().

CdbStatus CdbBdbSRegistryP::findByOrigin BdbHandle(CdbBdbSRegistryP)&    theRegistryH,
const char *    theOriginName,
const BdbMode    theOpenMode = BdbcRead
[static]
 

Static locator for a registry corresponding to specified origin name.

The method will return CdbStatus::NotFound if the registry is not found.

Definition at line 897 of file CdbBdbSRegistryP.cc.

References BdbRef(), CdbStatus::Error, CdbBdbSUtils::findContainer(), findMaster(), CdbStatus::NotFound, ooString(), and CdbStatus::Success.

CdbStatus CdbBdbSRegistryP::findByOrigin BdbHandle(CdbBdbSRegistryP)&    theRegistryH,
d_UShort    theOriginId,
const BdbMode    theOpenMode = BdbcRead
[static]
 

Static locator for a registry corresponding to specified origin ID.

The method will return CdbStatus::NotFound if the registry is not found.

Definition at line 816 of file CdbBdbSRegistryP.cc.

References BdbRef(), CdbStatus::Error, CdbBdbSUtils::findContainer(), findMaster(), CdbStatus::NotFound, ooString(), and CdbStatus::Success.

Referenced by CdbBdbSFolder::findCondition(), CdbBdbSDatabase::findCondition(), CdbBdbSDatabase::findPartition(), CdbBdbSDatabase::findView(), main(), CdbBdbSDatabase::partitionIterator(), CdbBdbSDatabase::physicalConditionIterator(), and updateMainView().

CdbStatus CdbBdbSRegistryP::findLocal BdbHandle(CdbBdbSRegistryP)&    theRegistryH,
const BdbMode    theOpenMode = BdbcRead
[static]
 

Static locator for the local registry.

The "local" registry is the one corresponding to the local DBID Range.

The method will return CdbStatus::NotFound if the registry is not found.

Definition at line 722 of file CdbBdbSRegistryP.cc.

References BdbRef(), CdbStatus::Error, CdbBdbSUtils::findContainer(), findMaster(), CdbBdbSUtils::getLocalDbIdRange(), CdbStatus::NotFound, ooString(), and CdbStatus::Success.

Referenced by CdbBdbSViewP::clone(), CdbBdbSTestRegistryP::create(), CdbBdbSSlaveRegistryP::create(), CdbBdbSMasterRegistryP::create(), main(), and CdbBdbSDatabase::open().

CdbStatus CdbBdbSRegistryP::findMaster BdbHandle(CdbBdbSRegistryP)&    theRegistryH,
const BdbMode    theOpenMode = BdbcRead
[static]
 

Static locator for the MASTER registry.

The method will return CdbStatus::NotFound if the registry is not found.

Definition at line 682 of file CdbBdbSRegistryP.cc.

References CdbBdbSUtils::findContainer(), CdbStatus::NotFound, and CdbStatus::Success.

Referenced by CdbBdbSPartitionP::close(), CdbBdbSTestRegistryP::create(), CdbBdbSSlaveRegistryP::create(), CdbBdbSMasterRegistryP::create(), CdbBdbSPartitionP::createIncrement(), findByOrigin(), findLocal(), CdbBdbSPartitionP::instantiate(), main(), CdbBdbSDatabase::open(), and updateMainView().

bool CdbBdbSRegistryP::hasLocalCollections   const
 

Definition at line 213 of file CdbBdbSRegistryP.cc.

BdbTime CdbBdbSRegistryP::id   const
 

Definition at line 207 of file CdbBdbSRegistryP.cc.

Referenced by CdbBdbSMasterRegistryP::CdbBdbSMasterRegistryP().

virtual bool CdbBdbSRegistryP::isMaster   const [pure virtual]
 

Check if it's the master.

Implemented in CdbBdbSMasterRegistryP, CdbBdbSSlaveRegistryP, and CdbBdbSTestRegistryP.

Referenced by dump().

CdbBdbSRegistryP::ooString 32    const
 

Referenced by CdbBdbSSlaveRegistryP::create(), findByOrigin(), and findLocal().

d_UShort CdbBdbSRegistryP::originId   const
 

Definition at line 189 of file CdbBdbSRegistryP.cc.

Referenced by CdbBdbSSlaveRegistryP::create(), and updateMainView().

CdbStatus CdbBdbSRegistryP::updateMainView  
 

Update the contents of the main view.

This operation will refresh the main view owned by the current registry using the information currently available in the federation.

The method will return CdbStatus::NotFound if the local registry does not have the views.

Definition at line 266 of file CdbBdbSRegistryP.cc.

References BdbRef(), CdbStatus::Error, findByOrigin(), findMaster(), CdbBdbSCollectionP::IteratorOfIdentifiers, CdbItr< d_UShort >::next(), CdbItr< T >::next(), CdbStatus::NotFound, originId(), CdbStatus::Success, CdbItr< d_UShort >::value(), and CdbItr< T >::value().


The documentation for this class was generated from the following files:
Generated on Mon Dec 5 18:22:20 2005 for CDB by doxygen1.3-rc3