BloombergLP::balb::ReservationGuard

This class template implements a proctor for reserving and cancelling units in a rate controlling object.

Synopsis

Declared in <balb_reservationguard.h>

template<class TYPE>
class ReservationGuard;

Description

This class: * is exception neutral (agnostic) * is const thread-safe For terminology see bsldoc_glossary.

Member Functions

NameDescription
ReservationGuard [constructor]Create a ReservationGuard object guarding the specified rateController and reserving the specified numUnits.
~ReservationGuard [destructor]Destroy this object. Invoke the cancelReserved method for the remaining remaining units reserved by this proctor.
cancelReserved Cancel the specified numUnits from the reserve units guarded by this object.
ptr Return a pointer to the rate controlling object used by this object.
submitReserved Submit the specified numUnits from the reserve units guarded by this object.
unitsReserved Return the number of units reserved by this object.