Adds a suspendable to the list of suspendables which are to be throttled if it's not already in there. Also ensures that the state of the added suspendable is consistent with the state of the throttler.
Clears the list of suspendables.
Removes a suspendable from the list of suspendables if it exists.
Decides whether the suspendables should be resumed. Called by throttledResume() when suspended.
Decides whether the suspendables should be suspended. Called by throttledSuspend() when not suspended.
Checks if resume limit has been reached and the suspendables need to be resumed.
Checks if the suspend limit has been reached and the suspendables need to be suspended.
Abstract base class for suspendable throttlers.
Provides the following functionality: * Maintains a set of ISuspendables which are suspended / resumed together. * A throttle() method, to be called when the suspension state should be updated / reassessed. * Abstract suspend() and resume() methods which define the conditions for suspension and resumption of the set of ISuspendables. * A suspended() method to tell whether the ISuspendables are suspended.