#include <CdbBdbObjectVisitorUserAction.hh>
Public Types | |
| enum | ActionType { ACTION_PROCEED, ACTION_STOP, ACTION_ERROR } |
| These values will be used to indicate the user's response. More... | |
| enum | { MAX_DATABASE = 0xFFFF } |
| Total number of databases in a federation. More... | |
Public Member Functions | |
| CdbBdbObjectVisitorUserAction (const char *theSupressFile=0, const std::list< d_UShort > *theDatabasesToIgnore=0, bool verboseMode=false, bool debugMode=false) | |
| The constructor. | |
| virtual | ~CdbBdbObjectVisitorUserAction () |
| The destructor. | |
| ActionType | action (const ooHandle(ooObj)&theInputH, const CdbBdbObjectVisitorContext *theContext) |
| Let a user to make a decision on what has to be done next. | |
| virtual void | print_statistics () const |
| Print the internal counters and table onto the Standard Output. | |
| unsigned long | totalObjects () const |
| Get the total number of objects visited. | |
| unsigned long | invalidObjects () const |
| Get the number of invalid objects found. | |
| unsigned int | missedCounters (d_UShort theDatabaseId) const |
| Get the number of times the specified database was found missing. | |
| const std::map< d_UShort, std::string > * | missedDatabaseClients (d_UShort theDatabaseId) const |
| Get clients of specified missing database. | |
Protected Member Functions | |
| virtual ActionType | userAction (const ooHandle(ooObj)&theInputH, const CdbBdbObjectVisitorContext *theContext) |
| Let a user to make a decision on what has to be done next (ACTUAL USER ACTION). | |
This base class has to implemented by users willing to control the "visitor" navigation in complex graphs.
IMPLEMENTATION NOTES:
(1) This class violates CDB API convention on the inclusion of "CdbBase/CdbCommon.hh" header file to avoid STD namespace conflicts of the kind described above.
Definition at line 29 of file CdbBdbObjectVisitorUserAction.hh.
|
|
Total number of databases in a federation. This value defined the limits [0..MAX_DATABASE] for certain operations involving database iderntifiers. Definition at line 44 of file CdbBdbObjectVisitorUserAction.hh. |
|
|
These values will be used to indicate the user's response.
Definition at line 35 of file CdbBdbObjectVisitorUserAction.hh. |
|
||||||||||||||||||||
|
The constructor. An optional file with a list of "known" patterns to be ignored/suppressed may be passed to the constructor. The file (if present) would be analysed and loaded into intyernal data structures. If something wrong happends during the file's translation then a run time assertion would happen. It's also possible to specify a list of DBID-s to be avoided. These databases (if any) would not be checked for validity. Definition at line 129 of file CdbBdbObjectVisitorUserAction.cc. References MAX_DATABASE. |
|
|
The destructor. Moe details... Definition at line 185 of file CdbBdbObjectVisitorUserAction.cc. References MAX_DATABASE. |
|
||||||||||||
|
Let a user to make a decision on what has to be done next. This wrapper method takes the "about-to-be-visited" link on the input. Ths link is evaluated by the method to report what's the next action should be. The second parameter passed town to the operation is the current context description in which the link has to be evaluated. Here is the explanation of possible responses: ACTION_PROCEED : a caller has to proceed and visit this node. ACTION_STOP : a caller should stop and not to propagate along this link. ACTION_ERROR : an error has happened inside the method. Normally the caller should stop visiting any further links. HOW IT WORKS:
-- check if the object's context matches one of the known patterns (if any). and if not then print diagnostic message (in verbose/debug modes) and update internal statistics for missing/corrupted databases. The action returned in this case would be ACTION_ERROR. -- otherwise the internal statistics would not be updated (although an informational message in verbose mode saying that the problem of the missing objects has been ignored due to known pattern would be still printed.) and the method would return ACTION_STOP.
Definition at line 196 of file CdbBdbObjectVisitorUserAction.cc. References ACTION_ERROR, ACTION_STOP, and userAction(). |
|
|
Get the number of invalid objects found.
Definition at line 129 of file CdbBdbObjectVisitorUserAction.hh. |
|
|
Get the number of times the specified database was found missing. The number returned by this method would be either 0 or a positive number. Returning 0 does not mean that specified databases exsists, it just means that the databases has not been found missing (noone attempted to use it). The database identifier must be a in the valid range [0..64k]. Otherwise a run time assertion would occure. Definition at line 311 of file CdbBdbObjectVisitorUserAction.cc. References MAX_DATABASE. |
|
|
Get clients of specified missing database. The result of this procedure would be either a 0 pointer or a const pointer onto a map with DBID-s and system names of clients. The map object itself would be located at a a user action object. WARNING: This method does not return the ownership of teh map object. The database identifier must be a in the valid range [0..64k]. Otherwise a run time assertion would occure. Definition at line 321 of file CdbBdbObjectVisitorUserAction.cc. References MAX_DATABASE. |
|
|
Print the internal counters and table onto the Standard Output. This method will print all statistics information accumulated by the current user object onto the Standard Output. This includes a list of missing databases and their clients. This method can be overriden by a subclass to add up extra information accumulated by the subclass. Definition at line 270 of file CdbBdbObjectVisitorUserAction.cc. References MAX_DATABASE. |
|
|
Get the total number of objects visited.
Definition at line 125 of file CdbBdbObjectVisitorUserAction.hh. |
|
||||||||||||
|
Let a user to make a decision on what has to be done next (ACTUAL USER ACTION). This method gets called only for valid objects. IMPLEMENTATION NOTE: In its default implementation this method would always return ACTION_PROCEED. This behaviour can be overriten by specific subclasses.
Definition at line 331 of file CdbBdbObjectVisitorUserAction.cc. References ACTION_PROCEED. Referenced by action(). |
1.3-rc3