Check if some some delayed operations can be completed with the given watch key, and if yes complete them.
Check if some some delayed operations can be completed with the given watch key, and if yes complete them.
the number of completed operations during this process
Return the number of delayed operations in the expiry queue
Shutdown the expire reaper thread
Check if the operation can be completed, if not watch it based on the given watch keys
Check if the operation can be completed, if not watch it based on the given watch keys
Note that a delayed operation can be watched on multiple keys. It is possible that an operation is completed after it has been added to the watch list for some, but not all of the keys. In this case, the operation is considered completed and won't be added to the watch list of the remaining keys. The expiration reaper thread will remove this operation from any watcher list in which the operation exists.
the delayed operation to be checked
keys for bookkeeping the operation
true iff the delayed operations can be completed by the caller
Return the total size of watch lists the purgatory.
Return the total size of watch lists the purgatory. Since an operation may be watched on multiple lists, and some of its watched entries may still be in the watch lists even when it has been completed, this number may be larger than the number of real operations watched
A helper purgatory class for bookkeeping delayed operations with a timeout, and expiring timed out operations.