ACE_Hash_Cache_Map_Manager< KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES > Class Template ReferenceDefines a abstraction which will purge entries from a map. The map considered is the ACE_Hash_Map_Manager_Ex. More...
Detailed Descriptiontemplate<class KEY, class VALUE, class HASH_KEY, class COMPARE_KEYS, class CACHING_STRATEGY, class ATTRIBUTES>
Defines a abstraction which will purge entries from a map. The map considered is the ACE_Hash_Map_Manager_Ex.
|
typedef ACE_Pair<VALUE, ATTRIBUTES> ACE_Hash_Cache_Map_Manager< KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES >::CACHE_VALUE |
The actual value mapped to the key in the map. The <attributes> are used by the strategy and is transparent to the user of this class.
typedef ACE_Hash_Map_Manager_Ex<KEY, CACHE_VALUE, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex> ACE_Hash_Cache_Map_Manager< KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES >::HASH_MAP |
typedef ACE_Hash_Map_Entry<KEY, CACHE_VALUE> ACE_Hash_Cache_Map_Manager< KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES >::CACHE_ENTRY |
typedef KEY ACE_Hash_Cache_Map_Manager< KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES >::key_type |
typedef VALUE ACE_Hash_Cache_Map_Manager< KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES >::mapped_type |
typedef ACMM<KEY, VALUE, ACE_Hash_Map_Manager_Ex<KEY, ACE_Pair<VALUE, ATTRIBUTES>, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex>, ACE_Hash_Map_Iterator_Ex<KEY, ACE_Pair<VALUE, ATTRIBUTES>, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex>, ACE_Hash_Map_Reverse_Iterator_Ex<KEY, ACE_Pair<VALUE, ATTRIBUTES>, HASH_KEY, COMPARE_KEYS, ACE_Null_Mutex>, CACHING_STRATEGY, ATTRIBUTES> ACE_Hash_Cache_Map_Manager< KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES >::ACE_HCMM_BASE [protected] |
Base class.
ACE_Hash_Cache_Map_Manager< KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES >::ACE_Hash_Cache_Map_Manager | ( | CACHING_STRATEGY & | caching_s, | |
size_t | size = ACE_DEFAULT_MAP_SIZE , |
|||
ACE_Allocator * | alloc = 0 | |||
) | [inline] |
Initialize a <Hash_Cache_Map_Manager> with size entries.
ACE_Hash_Cache_Map_Manager< KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES >::~ACE_Hash_Cache_Map_Manager | ( | void | ) | [inline] |
Close down a <Cache_Map_Manager> and release dynamically allocated resources.
ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE int ACE_Hash_Cache_Map_Manager< KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES >::bind | ( | const KEY & | key, | |
const VALUE & | value | |||
) | [inline] |
Associate key with value. If key is already in the MAP then the ENTRY is not changed. Returns 0 if a new entry is bound successfully, returns 1 if an attempt is made to bind an existing entry, and returns -1 if failures occur.
int ACE_Hash_Cache_Map_Manager< KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES >::bind | ( | const KEY & | key, | |
const VALUE & | value, | |||
CACHE_ENTRY *& | entry | |||
) | [inline] |
Same as a normal bind, except the cache entry is also passed back to the caller. The entry in this case will either be the newly created entry, or the existing one.
int ACE_Hash_Cache_Map_Manager< KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES >::find | ( | const KEY & | key, | |
VALUE & | value | |||
) | [inline] |
Loopkup entry<key,value> in the cache.
int ACE_Hash_Cache_Map_Manager< KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES >::find | ( | const KEY & | key | ) | [inline] |
Is key in the cache?
int ACE_Hash_Cache_Map_Manager< KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES >::find | ( | const KEY & | key, | |
CACHE_ENTRY *& | entry | |||
) | [inline] |
Obtain the entry when the find succeeds.
ACE_INLINE int ACE_Hash_Cache_Map_Manager< KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES >::rebind | ( | const KEY & | key, | |
const VALUE & | value | |||
) | [inline] |
Reassociate the key with value. If the key already exists in the cache then returns 1, on a new bind returns 0 and returns -1 in case of any failures.
ACE_INLINE int ACE_Hash_Cache_Map_Manager< KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES >::rebind | ( | const KEY & | key, | |
const VALUE & | value, | |||
VALUE & | old_value | |||
) | [inline] |
Reassociate key with value, storing the old value into the "out" parameter old_value. The function fails if key is not in the cache for caches that do not allow user specified keys. However, for caches that allow user specified keys, if the key is not in the cache, a new key / value association is created.
ACE_INLINE int ACE_Hash_Cache_Map_Manager< KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES >::rebind | ( | const KEY & | key, | |
const VALUE & | value, | |||
KEY & | old_key, | |||
VALUE & | old_value | |||
) | [inline] |
Reassociate key with value, storing the old key and value into the "out" parameters old_key and old_value. The function fails if key is not in the cache for caches that do not allow user specified keys. However, for caches that allow user specified keys, if the key is not in the cache, a new key / value association is created.
int ACE_Hash_Cache_Map_Manager< KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES >::rebind | ( | const KEY & | key, | |
const VALUE & | value, | |||
CACHE_ENTRY *& | entry | |||
) | [inline] |
Same as a normal rebind, except the cache entry is also passed back to the caller. The entry in this case will either be the newly created entry, or the existing one.
ACE_INLINE int ACE_Hash_Cache_Map_Manager< KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES >::trybind | ( | const KEY & | key, | |
VALUE & | value | |||
) | [inline] |
Associate key with value if and only if key is not in the cache. If key is already in the cache, then the value parameter is overwritten with the existing value in the cache. Returns 0 if a new key / value association is created. Returns 1 if an attempt is made to bind an existing entry. This function fails for maps that do not allow user specified keys.
int ACE_Hash_Cache_Map_Manager< KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES >::trybind | ( | const KEY & | key, | |
VALUE & | value, | |||
CACHE_ENTRY *& | entry | |||
) | [inline] |
Same as a normal trybind, except the cache entry is also passed back to the caller. The entry in this case will either be the newly created entry, or the existing one.
ACE_INLINE int ACE_Hash_Cache_Map_Manager< KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES >::unbind | ( | const KEY & | key | ) | [inline] |
Remove key from the cache.
ACE_INLINE int ACE_Hash_Cache_Map_Manager< KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES >::unbind | ( | const KEY & | key, | |
VALUE & | value | |||
) | [inline] |
Remove key from the cache, and return the value associated with key.
int ACE_Hash_Cache_Map_Manager< KEY, VALUE, HASH_KEY, COMPARE_KEYS, CACHING_STRATEGY, ATTRIBUTES >::unbind | ( | CACHE_ENTRY * | entry | ) | [inline] |
Remove entry from map.