#include <CdbCondition.hh>
Inheritance diagram for CdbCondition:

Public Member Functions | |
| const CdbFolderPtr & | parent () const |
| Return a smart pointer to the parent CdbFolder object. | |
| const CdbDatabasePtr & | parentDatabase () const |
| Return a smart pointer to the parent CdbDatabase object. | |
| const char * | name () const |
| Obtain the name of the condition in its folder. | |
| virtual std::string | description () const=0 |
| Obtain the condition description. | |
| virtual bool | isPartitionable () const=0 |
| Obtain the condition type. | |
| virtual CdbCompositeName | physicalName () const=0 |
| Obtain the full condition name in the 'physical' namespace. | |
| virtual CdbId | physicalId () const=0 |
| Obtain the full condition identifier in the 'physical' namespace. | |
| virtual BdbTime | created () const=0 |
| Get the condition creation time. | |
| virtual BdbTime | registered () const=0 |
| Get the condition registration time. | |
| virtual BdbTime | modified () const=0 |
| Get the last time when the condition was modified. | |
| virtual CdbStatus | findObject (CdbObjectPtr &theObjectPtr, const BdbTime &theValidityTime, const BdbTime &theInsertionTime=BdbTime::plusInfinity)=0 |
| Find a condition object. | |
| virtual CdbStatus | findObject (CdbObjectPtr &theObjectPtr, const CdbRevisionPolicy &thePolicy, const BdbTime &theValidityTime, const BdbTime &theInsertionTime=BdbTime::plusInfinity)=0 |
| Find a condition object. | |
| virtual CdbStatus | objectIterator (CdbObjectItr &theItr, const BdbTime &theBeginValidity=BdbTime::minusInfinity, const BdbTime &theEndValidity=BdbTime::plusInfinity)=0 |
| An iterator for the objects. | |
| virtual CdbStatus | objectIterator (CdbObjectItr &theItr, const CdbRevisionPolicy &thePolicy, const BdbTime &theBeginValidity=BdbTime::minusInfinity, const BdbTime &theEndValidity=BdbTime::plusInfinity)=0 |
| An iterator for the objects. | |
| virtual CdbStatus | originalObjectIterator (CdbObjectItr &theItr, const BdbTime &theBeginInsertion=BdbTime::minusInfinity, const BdbTime &theEndInsertion=BdbTime::plusInfinity, const unsigned short thePartitionId=0)=0 |
| An iterator for the 'original' objects. | |
| CdbStatus | storeObject (CdbObjectFactoryBase &theObjectFactory, const BdbTime &theBegin, const BdbTime &theEnd) |
| Create and store a new condition object in the database. | |
| virtual CdbStatus | storeObject (CdbObjectFactoryBase &theObjectFactory, const BdbTime &theBegin, const BdbTime &theEnd, CdbObjectPtr &theObjectPtr)=0 |
| Create and store a new condition object in the database. | |
| CdbStatus | storeAndTruncateObject (CdbObjectFactoryBase &theObjectFactory, const BdbTime &theStoreTime, const BdbTime &theTruncateTime) |
| Create and store a new condition object in the database. | |
| virtual CdbStatus | storeAndTruncateObject (CdbObjectFactoryBase &theObjectFactory, const BdbTime &theStoreTime, const BdbTime &theTruncateTime, CdbObjectPtr &theObjectPtr)=0 |
| Create and store a new condition object in the database. | |
| virtual CdbStatus | split (const BdbTime &theTime)=0 |
| Split the validity timeline at specified point. | |
| virtual CdbStatus | findRevision (CdbRevisionPtr &thePtr, const BdbTime &theId, unsigned short thePartitionId=0)=0 |
| Find a revision by its identifier. | |
| virtual CdbStatus | findRevision (CdbRevisionPtr &thePtr, const char *theName, unsigned short thePartitionId=0)=0 |
| Find a revision by its name. | |
| virtual CdbStatus | revisionIdIterator (CdbItr< BdbTime > &theItr, unsigned short thePartitionId=0)=0 |
| An iterator for the known revision identifiers. | |
| virtual CdbStatus | revisionNameIterator (CdbItr< const char * > &theItr, unsigned short thePartitionId=0)=0 |
| An iterator for the known revision names. | |
| virtual CdbStatus | createRevision (CdbRevisionPtr &thePtr, const BdbTime &theId, const char *theName, const char *theDescription, unsigned short thePartitionId=0)=0 |
| Create a new revision. | |
Static Public Member Functions | |
| CdbStatus | instance (CdbConditionPtr &theConditionPtr, const char *theFullPathName, const char *theViewName=0, const char *theDatabaseName=0, const char *theImplementationName=0, const char *theTechnologyName=0) |
| Static locator for a condition. | |
| CdbStatus | instance (CdbConditionPtr &theConditionPtr, const char *theFullPathName, const CdbId &theViewId, const char *theDatabaseName=0, const char *theImplementationName=0, const char *theTechnologyName=0) |
| Static locator for a condition. | |
| CdbStatus | instance (CdbConditionPtr &theConditionPtr, const CdbId &thePhysicalAddress, const char *theDatabaseName=0, const char *theImplementationName=0, const char *theTechnologyName=0) |
| Static locator for a condition. | |
| CdbStatus | instance (CdbConditionPtr &theConditionPtr, const CdbCompositeName &thePhysicalName, const char *theDatabaseName=0, const char *theImplementationName=0, const char *theTechnologyName=0) |
| Static locator for a condition. | |
| CdbStatus | instanceFromAny (CdbConditionPtr &theConditionPtr, const char *theConditionName, const char *theDatabaseName=0, const char *theImplementationName=0, const char *theTechnologyName=0) |
| Static locator for a condition. | |
| std::string | fullPathName (const CdbConditionPtr &theConditionPtr) |
| Calculate the full path for the condition. | |
Protected Member Functions | |
| CdbCondition (const CdbFolderPtr &theFolderPtr, const CdbDatabasePtr &theDatabasePtr, const char *theName) | |
| The normally used constructor will set the internal parameters of an object. | |
| CdbCondition (const CdbCondition &theCondition) | |
| The copy constructor. | |
| virtual | ~CdbCondition () |
| The destructor. | |
| CdbCondition & | operator= (const CdbCondition &theCondition) |
| The assignment operator. | |
Friends | |
| class | CdbCPtrBase< CdbCondition > |
Note, that this is an abstract class specifying the interface to the condition. It also maintains the general status of the Condition object as it's seen to its clients through the API.
This class also includes the CdbStateControl, CdbHistoryProvider and CdbCloneable interfaces.
Definition at line 46 of file CdbCondition.hh.
|
||||||||||||||||
|
The normally used constructor will set the internal parameters of an object. Initialize the context of the CdbCondition with specified set of fixed parameters. This will also validate the internal state of the object. The condition name must be non 0 pointer. This API component has two parameters to specify its "parent" API objects. Their values would vary depending on how the Condition API object was created:
The value of the folder pointer can also be used as flags to determine how the condition was created.
Definition at line 250 of file CdbCondition.cc. References CdbCPtr< CdbDatabase, CdbAlwaysClosePolicy< CdbDatabase > >::isNull(). |
|
|
The copy constructor. Details... Definition at line 261 of file CdbCondition.cc. |
|
|
The destructor. Is only available for the derived classes and friends to prevent accidental deletion of objects. Definition at line 267 of file CdbCondition.cc. |
|
|
Get the condition creation time. This is the time when the corresponding 'physical' condition was created. Note the difference of this time between the condition registration time.
Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition. |
|
||||||||||||||||||||||||
|
Create a new revision. This command if succeeded will create a new revision with specified parameters in a s cope of a condition (and partition for 'PARTTIONABLE' conditions). It will also initialize a smart pointer onto a transient API object representing a newely created revision. The operation would check if the revision can be created for a condition it (the operation) is being used at.
Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition. |
|
|
Obtain the condition description. This method is supposed to be implemented by the corresponding subclass.
Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition. |
|
||||||||||||||||||||
|
Find a condition object. Unlike the previous method, this one expects an explicit value of the "revision policy" to be used when looking for a condition object. Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition. |
|
||||||||||||||||
|
Find a condition object. This method will initialize a smart pointer to point onto a transient object representing an object of the CdbObject class. It may also initialize the smart pointer to point onto 0 object in case of failure. The corresponding error status will be returned in this case. The resulting object will be valid at given validity time point and optional insertion time point, assuming that other parameters of this operation are taken from a view the current condition belongs to. NOTE: The use or not use of the optional insertion time depends on two factors: (a) the kind of the condition and (b) the current revision policy for thsi condition.
Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition. |
|
||||||||||||||||
|
Find a revision by its name. This command if succeeded will initialize specified smart pointer to point onto a revision description object with required characteristics. NOTE: The "partition identifier" parameter is only required for so called "partitionable" conditions.
Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition. |
|
||||||||||||||||
|
Find a revision by its identifier. This command if succeeded will initialize specified smart pointer to point onto a revision description object with required characteristics. NOTE: The "partition identifier" parameter is only required for so called "partitionable" conditions.
Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition. |
|
|
Calculate the full path for the condition. The path would include all preceeding folders and the specified condition itself. The method will return an empty path containing "" in case of any problem met while calculating the path. NOTE: For conditions found via their 'physical' names or addresses the nethod will return that empty path since their (CdbCondition) API objects do not have any parent folders or views.
Definition at line 229 of file CdbCondition.cc. References CdbCPtr< CdbFolder, CdbAlwaysClosePolicy< CdbFolder > >::isNull(), CdbCPtr< CdbCondition, CdbAlwaysClosePolicy< CdbCondition > >::isNull(), and CdbPathName::toString(). Referenced by CdbRooRoCondition::findObject(), CdbBdbSCondition::findObject(), instance(), CdbRooRoCondition::objectIterator(), and CdbBdbSCondition::storeObject(). |
|
||||||||||||||||||||||||
|
Static locator for a condition. Unlike the previous methods, this one uses "physical name" of a condition.
Definition at line 153 of file CdbCondition.cc. References CdbStatus::Error, CdbDatabase::instance(), and CdbStatus::Success. |
|
||||||||||||||||||||||||
|
Static locator for a condition. Unlike the previous methods, this one uses "physical address" of a condition.
Definition at line 122 of file CdbCondition.cc. References CdbStatus::Error, CdbDatabase::instance(), and CdbStatus::Success. |
|
||||||||||||||||||||||||||||
|
Static locator for a condition. Unlike the previous method, this one uses "extended" identifier of a view instead of its name.
Definition at line 75 of file CdbCondition.cc. References CdbPathName::beforeLast(), CdbStatus::Error, fullPathName(), CdbFolder::instance(), CdbPathName::isAbsolute(), CdbPathName::isRoot(), CdbPathName::isValid(), CdbPathName::last(), CdbStatus::Success, and CdbPathName::toString(). |
|
||||||||||||||||||||||||||||
|
Static locator for a condition. Locates specified condition object and returns a smart pointer to the transient object of the current class. This "shortcut" allows to avoid the complicated multi-staged process of the object location, which is useless when the intermediate objects are not needed. The last parameter (a pointer to the top-level Cdb singleton) is optional. If 0 is passed then a default instance is used. Note, that if specified object is not found then a smart pointer is initialized to point to 0.
Definition at line 28 of file CdbCondition.cc. References CdbPathName::beforeLast(), CdbStatus::Error, fullPathName(), CdbFolder::instance(), CdbPathName::isAbsolute(), CdbPathName::isRoot(), CdbPathName::isValid(), CdbPathName::last(), CdbStatus::Success, and CdbPathName::toString(). Referenced by CdbObject::instance(), instanceFromAny(), main(), CdbBdbLoadList::storeObjects(), CdbRooProxyCache::updateCache(), CdbProxyCache::updateCache(), and CdbBdbProxyCache::updateCache(). |
|
||||||||||||||||||||||||
|
Static locator for a condition. The method is able to deal with multiple formats of the condition name, including the above mentioned: - a full path to the condition in a view: "/emc/EmcFooClassP" - a 'physical' address of the condition in the Distributed CDB: "0::112" - a 'physical' name of the condition in the Distributed CDB: "MASTER::EmcFooClassP"
Definition at line 184 of file CdbCondition.cc. References instance(), CdbCompositeName::isValid(), physicalName(), and CdbId::translate(). Referenced by main(). |
|
|
Obtain the condition type. This method is supposed to be implemented by the corresponding subclass.
Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition. |
|
|
Get the last time when the condition was modified. This method is supposed to be implemented by the corresponding subclass.
Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition. |
|
|
Obtain the name of the condition in its folder. It's guaranteed that a non 0 pointer will be returned.
Definition at line 294 of file CdbCondition.cc. Referenced by CdbBdbWCondition::clone(), CdbBdbSCondition::createRevision(), CdbSQLApiCondition::findObject(), CdbRooRoCondition::findObject(), CdbBdbWCondition::findObject(), CdbBdbSCondition::findObject(), CdbBdbWCondition::findRevision(), CdbBdbWCondition::hint(), CdbRooRoCondition::modified(), CdbSQLApiCondition::objectIterator(), CdbRooRoCondition::objectIterator(), CdbBdbWCondition::objectIterator(), CdbBdbSCondition::objectIterator(), CdbSQLApiCondition::originalObjectIterator(), CdbRooRoCondition::originalObjectIterator(), CdbBdbSCondition::originalObjectIterator(), CdbBdbWCondition::physicalName(), CdbBdbWCondition::split(), CdbBdbWCondition::storeAndTruncateObject(), CdbSQLApiCondition::storeObject(), CdbBdbWCondition::storeObject(), and CdbBdbSCondition::storeObject(). |
|
||||||||||||||||||||
|
An iterator for the objects. Unlike the previous method, this one expects an explicit value of the "revision policy" to be used when looking for condition objects. Note, that for partitionable conditions the specified validity interval would be reduced to the width of the specified (by the policy) partition. No error status would be reported if these intervals won't intersect.
Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition. |
|
||||||||||||||||
|
An iterator for the objects. Initializes an iterator to find all Objects at a given scope of a condition. The iterator when advanced will return an CdbObjectPtr smart pointer. It may also initialize the iterator to be in the non-valid state in case of failure. he corresponding error status will be returned in this case. The scope is defined by an interval at the validity dimension and the current configuration of a view.
Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition. |
|
|
The assignment operator. Details... Definition at line 271 of file CdbCondition.cc. References _myName, _myParent, and _myParentDatabase. |
|
||||||||||||||||||||
|
An iterator for the 'original' objects. Initializes an iterator to find all Objects at a given scope of a condition. The iterator when advanced will return an CdbObjectPtr smart pointer. It may also initialize the iterator to be in the non-valid state in case of failure. he corresponding error status will be returned in this case. The scope is defined by an interval at the insertion dimension, a partition identifier and the corresponding 'physical' condition as it's defined by the current configuration of a view.
Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition. |
|
|
Return a smart pointer to the parent CdbFolder object. This is a folder where this condition is directly connected to. Note, that for conditions found through their 'physical' names or addresses the returned pointer would always be equal to 0.
Definition at line 282 of file CdbCondition.cc. Referenced by CdbBdbWCondition::clone(), CdbRooRoCondition::findObject(), CdbBdbWCondition::findObject(), CdbBdbSCondition::findObject(), CdbBdbWCondition::findRevision(), CdbBdbWCondition::hint(), CdbSQLApiCondition::objectIterator(), CdbRooRoCondition::objectIterator(), CdbBdbWCondition::objectIterator(), CdbBdbSCondition::objectIterator(), CdbSQLApiCondition::originalObjectIterator(), CdbBdbWCondition::split(), CdbBdbWCondition::storeAndTruncateObject(), and CdbBdbWCondition::storeObject(). |
|
|
Return a smart pointer to the parent CdbDatabase object. This is a database where this condition is directly connected to.
Definition at line 288 of file CdbCondition.cc. Referenced by CdbBdbWCondition::clone(), CdbSQLApiCondition::findObject(), and CdbSQLApiCondition::storeObject(). |
|
|
Obtain the full condition identifier in the 'physical' namespace. This method is supposed to be implemented by the corresponding subclass.
Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition. |
|
|
Obtain the full condition name in the 'physical' namespace. This method is supposed to be implemented by the corresponding subclass.
Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition. Referenced by instanceFromAny(). |
|
|
Get the condition registration time. This is a time when the condition entry was put into the folder (view). Note the difference of this time from the corresponding 'physical' condition creation time.
Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition. |
|
||||||||||||
|
An iterator for the known revision identifiers. Initializes an iterator to find all revision identifiers at a scope of the current condition/partition. The iterator when advanced will return an object of BdbTime class. These objects can be turned into revision description objects by calling CdbConditionMgr::findRevision() method described above. The iterator will be set into a "valid" state upon successfull completion. NOTE: The "partition identifier" parameter is only required for so called "partitionable" conditions.
Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition. |
|
||||||||||||
|
An iterator for the known revision names. Initializes an iterator to find all revision names at a scope of the current condition/partition. The iterator when advanced will return (pointers to) strings. These objects can be turned into revision description objects by calling CdbConditionMgr::findRevision() method described above. The iterator will be set into a "valid" state upon successfull completion. NOTE: The "partition identifier" parameter is only required for so called "partitionable" conditions.
Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition. |
|
|
Split the validity timeline at specified point. ATTENTION: This is a temporary method for backward compatibility with the old API introduced on a period of migration.
Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition. |
|
||||||||||||||||||||
|
Create and store a new condition object in the database. This is an extended form of the previous method returning a smart pointer corresponding to the newely created object. IMPORTANT: The validity interval of the returned object could be shorter than the original intention if the corresponding restrictions are imposed by the current view.
Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition. |
|
||||||||||||||||
|
Create and store a new condition object in the database. This method is here for backward compatibility with the corresponding feature of the old Condition/DB.
Definition at line 312 of file CdbCondition.cc. |
|
||||||||||||||||||||
|
Create and store a new condition object in the database. This is an extended form of the previous method returning a smart pointer corresponding to the newely created object. IMPORTANT: The validity interval of the returned object could be shorter than the original intention if the corresponding restrictions are imposed by the current view.
Implemented in CdbBdbWCondition, CdbBdbSCondition, CdbRooRoCondition, and CdbSQLApiCondition. |
|
||||||||||||||||
|
Create and store a new condition object in the database. The new object is created via a special factory passed by a reference onto its (factory's) base class. It's expected that a client of this API is responsible for preparing these factories creating concrete persistent objects on the base of a particular technology. If the creation and verification of this objects succeeds then a new object is registered in the database with specified interval of validity.
Definition at line 300 of file CdbCondition.cc. |
|
|
Definition at line 50 of file CdbCondition.hh. |
1.3-rc3