Holds and distributes locks to be used for locking ACE_Data_Blocks. Currently it does not require returning the locks. More...
#include <DataBlockLockPool.h>


Public Types | |
| typedef ACE_Lock_Adapter < ACE_Thread_Mutex > | DataBlockLock |
Public Member Functions | |
| DataBlockLockPool (unsigned long size) | |
| ~DataBlockLockPool () | |
| DataBlockLock * | get_lock () |
Private Types | |
| typedef ACE_Array< DataBlockLock > | Pool |
Private Attributes | |
| Pool | pool_ |
| const unsigned long | size_ |
| ACE_Atomic_Op < ACE_Thread_Mutex, unsigned long > | iterator_ |
| Counter used to track which lock to give out next (modulus size_). | |
Holds and distributes locks to be used for locking ACE_Data_Blocks. Currently it does not require returning the locks.
: The lock returned is not guaranteed to be unique.
: This class is thread safe.
Definition at line 28 of file DataBlockLockPool.h.
Definition at line 30 of file DataBlockLockPool.h.
typedef ACE_Array<DataBlockLock> DataBlockLockPool::Pool [private] |
Definition at line 47 of file DataBlockLockPool.h.
| DataBlockLockPool::DataBlockLockPool | ( | unsigned long | size | ) | [inline] |
Definition at line 32 of file DataBlockLockPool.h.
| DataBlockLockPool::~DataBlockLockPool | ( | ) | [inline] |
Definition at line 39 of file DataBlockLockPool.h.
| DataBlockLock* DataBlockLockPool::get_lock | ( | ) | [inline] |
Definition at line 41 of file DataBlockLockPool.h.
ACE_Atomic_Op<ACE_Thread_Mutex, unsigned long> DataBlockLockPool::iterator_ [private] |
Counter used to track which lock to give out next (modulus size_).
Definition at line 52 of file DataBlockLockPool.h.
Pool DataBlockLockPool::pool_ [private] |
Definition at line 49 of file DataBlockLockPool.h.
const unsigned long DataBlockLockPool::size_ [private] |
Definition at line 50 of file DataBlockLockPool.h.
1.6.1