#include <coherence/util/ConverterCollections.hpp>
Inherits ConverterCollections::ConverterMap, and ConcurrentMap.
Public Types | |||||||
typedef spec::Handle | Handle | ||||||
ConverterConcurrentMap Handle definition. | |||||||
typedef spec::View | View | ||||||
ConverterConcurrentMap View definition. | |||||||
typedef spec::Holder | Holder | ||||||
ConverterConcurrentMap Holder definition. | |||||||
Public Member Functions | |||||||
virtual bool | lock (Object::View vKey, int64_t cWait) const | ||||||
Attempt to lock the specified item within the specified period of time. The item doesn't have to exist to be locked. While the item is locked there is known to be a lock holder which has an exclusive right to modify (calling put and remove methods) that item. Lock holder is an abstract concept that depends on the ConcurrentMap implementation. For example, holder could be a process or a thread (or both). Locking strategy may vary for concrete implementations as well. Lock could have an expiration time (this lock is sometimes called a "lease") or be held indefinitely (until the lock holder terminates). Some implementations may allow the entire map to be locked. If the map is locked in such a way, then only a lock holder is allowed to perform any of the "put" or "remove" operations. Pass the special constant getLockAll() as the vKey parameter to indicate the map lock.
| |||||||
virtual bool | lock (Object::View vKey) const | ||||||
Attempt to lock the specified item and return immediately.
This method behaves exactly as if it simply performs the call
| |||||||
virtual bool | unlock (Object::View vKey) const | ||||||
Unlock the specified item. The item doesn't have to exist to be unlocked. If the item is currently locked, only the holder of the lock could successfully unlock it.
| |||||||
virtual ConcurrentMap::View | getConcurrentMap () const | ||||||
Return the underlying ConcurrentMap. | |||||||
virtual ConcurrentMap::Handle | getConcurrentMap () | ||||||
Return the underlying ConcurrentMap. | |||||||
Protected Member Functions | |||||||
ConverterConcurrentMap (ConcurrentMap::Handle hMapDelegate, EntryConverter::View vConvUp, EntryConverter::View vConvDown) | |||||||
Create a ConverterConcurrentMap which delegates to the specified ConcurrentMap. | |||||||
ConverterConcurrentMap (ConcurrentMap::View vMapDelegate, EntryConverter::View vConvUp, EntryConverter::View vConvDown) | |||||||
Create a ConverterConcurrentMap which delegates to the specified ConcurrentMap. |
ConverterConcurrentMap | ( | ConcurrentMap::Handle | hMapDelegate, | |
EntryConverter::View | vConvUp, | |||
EntryConverter::View | vConvDown | |||
) | [protected] |
Create a ConverterConcurrentMap which delegates to the specified ConcurrentMap.
hMap | the specified ConcurrentMap | |
vConvUp | the EntryConverter from the underlying Map | |
vConvDown | the EntryConverter to the underlying Map |
ConverterConcurrentMap | ( | ConcurrentMap::View | vMapDelegate, | |
EntryConverter::View | vConvUp, | |||
EntryConverter::View | vConvDown | |||
) | [protected] |
Create a ConverterConcurrentMap which delegates to the specified ConcurrentMap.
vMap | the specified ConcurrentMap | |
vConvUp | the EntryConverter from the underlying Map | |
vConvDown | the EntryConverter to the underlying Map |
virtual ConcurrentMap::View getConcurrentMap | ( | ) | const [virtual] |
virtual ConcurrentMap::Handle getConcurrentMap | ( | ) | [virtual] |