Public Member Functions | |
Scoreboard (uint32_t in_number_sessions, uint32_t in_number_buckets) | |
ScoreboardSlot * | findScoreboardSlotToLog (drizzled::Session *session) |
ScoreboardSlot * | findOurScoreboardSlot (drizzled::Session *session) |
uint32_t | getBucketNumber (drizzled::Session *) const |
uint32_t | getNumberBuckets () const |
uint32_t | getNumberPerBucket () const |
uint64_t | getScoreboardSizeBytes () const |
std::vector< boost::shared_mutex * > * | getVectorOfScoreboardLocks () |
std::vector< std::vector< ScoreboardSlot * > * > * | getVectorOfScoreboardVectors () |
Private Member Functions | |
ScoreboardSlot * | claimOpenScoreboardSlot (drizzled::Session *session) |
Private Attributes | |
uint32_t | number_sessions |
uint32_t | number_per_bucket |
uint32_t | number_buckets |
uint64_t | scoreboard_size_bytes |
std::vector< std::vector< ScoreboardSlot * > * > | vector_of_scoreboard_vectors |
std::vector< boost::shared_mutex * > | vector_of_scoreboard_locks |
Definition at line 38 of file scoreboard.h.
ScoreboardSlot * Scoreboard::findOurScoreboardSlot | ( | drizzled::Session * | session | ) |
Finds the ScoreboardSlot for a given session. This function differs from findAndResetScoreboardSlot() as it returns the actual pointer rather then a copy. Its possible that values could be changed in the underlying status variables, callers should beware.
Definition at line 149 of file scoreboard.cc.
ScoreboardSlot * Scoreboard::findScoreboardSlotToLog | ( | drizzled::Session * | session | ) |
Locates a ScoreboardSlot that is not in use, marks the slot as being used and returns a pointer to it. The caller can update individual statistics via the pointer without having to lock or worry about concurrent updates.
Pointer | to the session |
Definition at line 110 of file scoreboard.cc.
References drizzled::Session::getSessionId().