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

CdbBdbSTestRegistryP.ddl

Go to the documentation of this file.
00001 #ifndef CDBBDBSHARED_TEST_REGISTRY_P_HH
00002 #define CDBBDBSHARED_TEST_REGISTRY_P_HH
00003 
00004 // File and Version Information:
00005 //      $Id: CdbBdbSTestRegistryP.ddl,v 1.2 2002/09/23 22:41:12 gapon Exp $
00006 
00007 #include "BdbUtil/Bdb.hh"
00008 
00009 #include "CdbBdbShared/CdbBdbSRegistryP.hh"
00010 
00011 /// A Registry for the TEST kind of databases.
00012 /**
00013   * See details below.
00014   */
00015 class CdbBdbSTestRegistryP : public CdbBdbSRegistryP {
00016 
00017 public:
00018 
00019   /// Factory method for objects of this class.
00020   /**
00021     * IMPORTANT: This operation can only be run against a federation, which
00022     *            already loaded with CDB infrastructure for the corresponding
00023     *            MASTER database.
00024     *
00025     * The parameters of the registry will be inquired from the collection
00026     * of origins found at the MASTER's federation.
00027     */
00028     static CdbStatus create( BdbHandle(CdbBdbSRegistryP)& theRegistryH,     /**< the resulting persistent object */
00029                              const char*                  theDescription    /**< the description of the database */
00030                            );
00031 
00032 private:
00033 
00034   /// Default constructor (NOT IMPLEMENTED)
00035 
00036     CdbBdbSTestRegistryP( );
00037 
00038 public:
00039 
00040   /// Normal constructor
00041   /**
00042     * NOTES:
00043     *
00044     * - the "id" of a TEST database must be the same as its MASTER's one.
00045     *
00046     * ATTENTION: Use the above defined static factory method to create
00047     *            persistent objects of this class.
00048     *
00049     * @see CdbBdbSTestRegistryP::create()
00050     */
00051     CdbBdbSTestRegistryP( const char*    theDescription,    /**< the description of the database */
00052                           const BdbTime& theCreationTime,   /**< the time when the database is supposed to be created */
00053                           const BdbTime& theId              /**< the unique identifier of the whole Condition/DB database */
00054                         );
00055 
00056   /// Destructor
00057   /**
00058     */
00059     virtual ~CdbBdbSTestRegistryP( );
00060 
00061   /// Check if it's the master
00062 
00063     virtual bool isMaster( ) const;
00064 
00065   // There is no specific collections at this level. Null references are always
00066   // returned.
00067 
00068     virtual BdbRef(CdbBdbSOriginCollectionP)  originCollection  ( ) const;
00069     virtual BdbRef(CdbBdbSPartitionsLayoutP)  partitionsLayout  ( ) const;
00070     virtual BdbRef(CdbBdbSClusterCollectionP) pClusterCollection( ) const;
00071 
00072 
00073     virtual BdbRef(CdbBdbSRallocatorP< d_UShort >) originRallocator   ( ) const;
00074     virtual BdbRef(CdbBdbSRallocatorP< d_UShort >) partitionRallocator( ) const;
00075     virtual BdbRef(CdbBdbSRallocatorP< d_UShort >) pClusterRallocator ( ) const;
00076 };
00077 
00078 #endif /* CDBBDBSHARED_TEST_REGISTRY_P_HH */

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