diff options
Diffstat (limited to 'src/mongo/db/concurrency/locker.h')
-rw-r--r-- | src/mongo/db/concurrency/locker.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mongo/db/concurrency/locker.h b/src/mongo/db/concurrency/locker.h index be9f3ea0730..cdc490e1379 100644 --- a/src/mongo/db/concurrency/locker.h +++ b/src/mongo/db/concurrency/locker.h @@ -57,6 +57,17 @@ public: */ static void setGlobalThrottling(class TicketHolder* reading, class TicketHolder* writing); + /** + * State for reporting the number of active and queued reader and writer clients. + */ + enum ClientState { kInactive, kActiveReader, kActiveWriter, kQueuedReader, kQueuedWriter }; + + /** + * Return whether client is holding any locks (active), or is queued on any locks or waiting + * for a ticket (throttled). + */ + virtual ClientState getClientState() const = 0; + virtual LockerId getId() const = 0; /** |