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

CdbBdbSSlaveRegistryP Class Reference

A Registry for the SLAVE kind of databases. More...

Inheritance diagram for CdbBdbSSlaveRegistryP:

CdbBdbSRegistryP BdbPersObj List of all members.

Public Member Functions

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

virtual ~CdbBdbSSlaveRegistryP ()
 Destructor.

virtual bool isMaster () const
 Check if it's the master.

virtual BdbRef (CdbBdbSOriginCollectionP) originCollection() const
virtual BdbRef (CdbBdbSRallocatorP< d_UShort >) originRallocator() const
virtual BdbRef (CdbBdbSRallocatorP< d_UShort >) partitionRallocator() const
virtual BdbRef (CdbBdbSClusterCollectionP) pClusterCollection() const
virtual BdbRef (CdbBdbSRallocatorP< d_UShort >) pClusterRallocator() const
virtual BdbRef (CdbBdbSPartitionsLayoutP) partitionsLayout() const

Static Public Member Functions

CdbStatus create (BdbHandle(CdbBdbSRegistryP)&theRegistryH)
 Factory method for objects of this class.


Detailed Description

A Registry for the SLAVE kind of databases.

See details below.

Definition at line 19 of file CdbBdbSSlaveRegistryP.ddl.


Constructor & Destructor Documentation

CdbBdbSSlaveRegistryP::CdbBdbSSlaveRegistryP d_UShort    theOriginId,
const char *    theDescription,
const BdbTime   theCreationTime,
const BdbTime   theId
 

Normal constructor.

NOTES:

  • the "id" of a SLAVE database must be the same as its MASTER's one.

  • the "origin" of a SLAVE must be not be the reserved one. See a list of the reserved identifiers in the header file of the CdbBdbSOriginP class.

ATTENTION: Use the above defined static factory method to create persistent objects of this class.

See also:
CdbBdbSSlaveRegistryP::create()

CdbBdbSOriginP

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

Definition at line 167 of file CdbBdbSSlaveRegistryP.cc.

References CdbBdbSRegistryP::defaultDbIdRange(), and CdbBdbSUtils::getLocalDbIdRange().

Referenced by create().

CdbBdbSSlaveRegistryP::~CdbBdbSSlaveRegistryP   [virtual]
 

Destructor.

Definition at line 210 of file CdbBdbSSlaveRegistryP.cc.


Member Function Documentation

virtual CdbBdbSSlaveRegistryP::BdbRef CdbBdbSPartitionsLayoutP    const [virtual]
 

Implements CdbBdbSRegistryP.

virtual CdbBdbSSlaveRegistryP::BdbRef CdbBdbSRallocatorP< d_UShort >    const [virtual]
 

Implements CdbBdbSRegistryP.

virtual CdbBdbSSlaveRegistryP::BdbRef CdbBdbSClusterCollectionP    const [virtual]
 

Implements CdbBdbSRegistryP.

virtual CdbBdbSSlaveRegistryP::BdbRef CdbBdbSRallocatorP< d_UShort >    const [virtual]
 

Implements CdbBdbSRegistryP.

virtual CdbBdbSSlaveRegistryP::BdbRef CdbBdbSRallocatorP< d_UShort >    const [virtual]
 

Implements CdbBdbSRegistryP.

virtual CdbBdbSSlaveRegistryP::BdbRef CdbBdbSOriginCollectionP    const [virtual]
 

Implements CdbBdbSRegistryP.

Referenced by create().

CdbStatus CdbBdbSSlaveRegistryP::create BdbHandle(CdbBdbSRegistryP)&    theRegistryH [static]
 

Factory method for objects of this class.

IMPORTANT: This operation can only be run against a federation, which already loaded with CDB infrastructure for the corresponding MASTER database.

The parameters of the registry will be inquired from the collection of origins by identifying one of the SLAVE kinds of them (origins) having the same DBID range as the local one. It means that the origin should already be known to the MASTER.

Parameters:
theRegistryH  the resulting persistent object

Definition at line 25 of file CdbBdbSSlaveRegistryP.cc.

References BdbRef(), CdbBdbSSlaveRegistryP(), CdbBdbSRegistryP::defaultDbIdRange(), CdbStatus::Error, CdbBdbSRegistryP::findLocal(), CdbBdbSRegistryP::findMaster(), CdbBdbSUtils::getLocalDbIdRange(), CdbBdbSCollectionP::IteratorOfIdentifiers, BdbTime::now(), CdbBdbSRegistryP::ooString(), CdbBdbSRegistryP::originId(), CdbBdbSOriginP::SLAVE, and CdbStatus::Success.

bool CdbBdbSSlaveRegistryP::isMaster   const [virtual]
 

Check if it's the master.

Implements CdbBdbSRegistryP.

Definition at line 219 of file CdbBdbSSlaveRegistryP.cc.


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