|
BDE 4.14.0 Production release
|
#include <balb_reservationguard.h>
Public Member Functions | |
| ReservationGuard (TYPE *rateController, bsls::Types::Uint64 numUnits) | |
| ~ReservationGuard () | |
| void | cancelReserved (bsls::Types::Uint64 numUnits) |
| void | submitReserved (bsls::Types::Uint64 numUnits) |
| TYPE * | ptr () const |
| Return a pointer to the rate controlling object used by this object. | |
| bsls::Types::Uint64 | unitsReserved () const |
| Return the number of units reserved by this object. | |
This class template implements a proctor for reserving and cancelling units in a rate controlling object.
This class:
|
inline |
Create a ReservationGuard object guarding the specified rateController and reserving the specified numUnits.
|
inline |
Destroy this object. Invoke the cancelReserved method for the remaining remaining units reserved by this proctor.
|
inline |
Cancel the specified numUnits from the reserve units guarded by this object. Subtract the numUnits from unitsReserved and invoke the cancelReserved method on the guarded object for numUnits. After this operation, the number of reserved units guarded by this object will be reduced by numUnits. The behavior is undefined unless numUnits <= unitsReserved().
|
inline |
|
inline |
Submit the specified numUnits from the reserve units guarded by this object. After this operation, the number of reserved units guarded by this object will be reduced by numUnits. The behavior is undefined unless numUnits <= unitsReserved().
|
inline |