#include <coherence/util/ConcurrentMap.hpp>
It's used on conjunction with the COH_CACHE_LOCK macros.
Public Member Functions | |
| LockBlock (ConcurrentMap::Handle hMap, Object::View vKey, bool fTryLock, int64_t cWait=-1L) | |
| Construct a LockBlock that will lock the supplied map. | |
| LockBlock (const LockBlock &that) | |
| Copy constructor used by the COH_CACHE_LOCK macros. | |
| ~LockBlock () | |
| Destroy an LockBlock object, exiting the associated map. | |
| operator bool () const | |
| Boolean conversion for the COH_CACHE_LOCK macros. | |
Protected Attributes | |
| ConcurrentMap::Handle | m_hMap |
| Map to lock and unlock. | |
| const Object::View | m_vKey |
| Key to lock and unlock in the associated Map. | |
| const bool | m_fTryLock |
| Flag describing the type of lock being used. | |
| LockBlock | ( | ConcurrentMap::Handle | hMap, | |
| Object::View | vKey, | |||
| bool | fTryLock, | |||
| int64_t | cWait = -1L | |||
| ) |
Construct a LockBlock that will lock the supplied map.
| hMap | the map to lock | |
| vKey | the Key to lock int he map | |
| cWait | the number of milliseconds to continue trying to obtain a lock; pass zero to return immediately; pass -1 to block the calling thread until the lock could be obtained |
| operator bool | ( | ) | const |
Boolean conversion for the COH_CACHE_LOCK macros.