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

CdbBdbSMasterRegistryP.ddl

Go to the documentation of this file.
00001 #ifndef CDBBDBSHARED_MASTER_REGISTRY_P_HH
00002 #define CDBBDBSHARED_MASTER_REGISTRY_P_HH
00003 
00004 // File and Version Information:
00005 //      $Id: CdbBdbSMasterRegistryP.ddl,v 1.3 2002/09/23 22:41:10 gapon Exp $
00006 
00007 #include "BdbUtil/Bdb.hh"
00008 
00009 #include "CdbBdbShared/CdbBdbSRegistryP.hh"
00010 
00011 /// Master registry class
00012 /**
00013   */
00014 class CdbBdbSMasterRegistryP : public CdbBdbSRegistryP {
00015 
00016 public:
00017 
00018   /// Factory method for objects of this class.
00019   /**
00020     * IMPORTANT: This operation can only be run against a federation, which
00021     *            does not have any CDB infrastructure.
00022     *
00023     * The "id" of the MASTER database is the same as its creation time.
00024     */
00025     static CdbStatus create( BdbHandle(CdbBdbSRegistryP)& theRegistryH,     /**< the resulting persistent object */
00026                              const char*                  theDescription,   /**< the description of the database */
00027                              const BdbTime&               theCreationTime   /**< the time when the database is supposed to be created */
00028                            );
00029 
00030 private:
00031 
00032   /// Default constructor (NOT IMPLEMENTED)
00033 
00034     CdbBdbSMasterRegistryP( );
00035 
00036 public:
00037 
00038   /// Normal constructor
00039   /**
00040     * The "id" of the MASTER database is the same as its creation time.
00041     *
00042     * ATTENTION: Use the above defined static factory method to create
00043     *            persistent objects of this class.
00044     *
00045     * @see CdbBdbSMasterRegistryP::create()
00046     */
00047     CdbBdbSMasterRegistryP( const char*    theDescription,      /**< the description of the database */
00048                             const BdbTime& theCreationTime      /**< the time when the database is supposed to be created */
00049                           );
00050 
00051   /// Destructor
00052   /**
00053     */
00054     virtual ~CdbBdbSMasterRegistryP( );
00055 
00056   /// Check if it's the master
00057 
00058     virtual bool isMaster( ) const;
00059 
00060   // MASTER-only collections and resources
00061 
00062     virtual BdbRef(CdbBdbSOriginCollectionP)  originCollection  ( ) const;
00063     virtual BdbRef(CdbBdbSPartitionsLayoutP)  partitionsLayout  ( ) const;
00064     virtual BdbRef(CdbBdbSClusterCollectionP) pClusterCollection( ) const;
00065 
00066     virtual BdbRef(CdbBdbSRallocatorP< d_UShort >) originRallocator   ( ) const;
00067     virtual BdbRef(CdbBdbSRallocatorP< d_UShort >) partitionRallocator( ) const;
00068     virtual BdbRef(CdbBdbSRallocatorP< d_UShort >) pClusterRallocator ( ) const;
00069 
00070 private:
00071 
00072   // Data members
00073 
00074     BdbRef(CdbBdbSOriginCollectionP)  _originCollectionRef;
00075     BdbRef(CdbBdbSPartitionsLayoutP)  _partitionsLayoutRef;
00076     BdbRef(CdbBdbSClusterCollectionP) _pClusterCollectionRef;
00077 
00078     BdbRef(CdbBdbSRallocatorP< d_UShort >) _originRallocatorRef;
00079     BdbRef(CdbBdbSRallocatorP< d_UShort >) _partitionRallocatorRef;
00080     BdbRef(CdbBdbSRallocatorP< d_UShort >) _pClusterRallocatorRef;
00081 };
00082 
00083 #endif /* CDBBDBSHARED_MASTER_REGISTRY_P_HH */

Generated on Mon Dec 5 18:22:02 2005 for CDB by doxygen1.3-rc3