Drizzled Public API Documentation

Scoreboard Class Reference

Public Member Functions

 Scoreboard (uint32_t in_number_sessions, uint32_t in_number_buckets)
ScoreboardSlotfindScoreboardSlotToLog (drizzled::Session *session)
ScoreboardSlotfindOurScoreboardSlot (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

ScoreboardSlotclaimOpenScoreboardSlot (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

Detailed Description

Definition at line 38 of file scoreboard.h.

Member Function Documentation

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.

Parameters
Pointerto the session
Returns
Pointer to the ScoreboardSlot whose individual statistics can be updated

Definition at line 110 of file scoreboard.cc.

References drizzled::Session::getSessionId().


The documentation for this class was generated from the following files: