Collaboration diagram for ACE_Cache_Map_Manager< KEY, VALUE, CMAP_TYPE, ITERATOR_IMPL, REVERSE_ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES >:
|
Public Types |
typedef KEY | key_type |
typedef VALUE | mapped_type |
typedef CMAP_TYPE | map_type |
typedef CACHING_STRATEGY | caching_strategy_type |
typedef ITERATOR_IMPL | ITERATOR_IMPLEMENTATION |
typedef REVERSE_ITERATOR_IMPL | REVERSE_ITERATOR_IMPLEMENTATION |
typedef ACE_Cache_Map_Iterator<
KEY, VALUE, ITERATOR_IMPLEMENTATION,
CACHING_STRATEGY, ATTRIBUTES > | ITERATOR |
typedef ACE_Cache_Map_Reverse_Iterator<
KEY, VALUE, REVERSE_ITERATOR_IMPLEMENTATION,
CACHING_STRATEGY, ATTRIBUTES > | REVERSE_ITERATOR |
typedef ITERATOR | iterator |
typedef REVERSE_ITERATOR | reverse_iterator |
typedef ACE_Pair< VALUE, ATTRIBUTES > | CACHE_VALUE |
Public Member Functions |
| ACE_Cache_Map_Manager (CACHING_STRATEGY &caching_strategy, size_t size=ACE_DEFAULT_MAP_SIZE, ACE_Allocator *alloc=0) |
virtual | ~ACE_Cache_Map_Manager (void) |
int | open (size_t length=ACE_DEFAULT_MAP_SIZE, ACE_Allocator *alloc=0) |
| Initialize a cache with size <length>.
|
int | close (void) |
| Close down a cache and release dynamically allocated resources.
|
int | bind (const KEY &key, const VALUE &value) |
int | find (const KEY &key, VALUE &value) |
int | find (const KEY &key) |
int | rebind (const KEY &key, const VALUE &value) |
int | rebind (const KEY &key, const VALUE &value, VALUE &old_value) |
int | rebind (const KEY &key, const VALUE &value, KEY &old_key, VALUE &old_value) |
int | trybind (const KEY &key, VALUE &value) |
int | unbind (const KEY &key) |
| Remove <key> from the cache.
|
int | unbind (const KEY &key, VALUE &value) |
int | purge (void) |
| Remove entries from the cache depending upon the strategy.
|
size_t | current_size (void) const |
| Return the current size of the cache.
|
size_t | total_size (void) const |
| Return the total size of the cache.
|
void | dump (void) const |
| Dumps the state of the object.
|
ITERATOR | begin (void) |
| Return forward iterator.
|
ITERATOR | end (void) |
REVERSE_ITERATOR | rbegin (void) |
| Return reverse iterator.
|
REVERSE_ITERATOR | rend (void) |
CMAP_TYPE & | map (void) |
| The map managed by the Cache_Map_Manager.
|
CACHING_STRATEGY & | caching_strategy (void) |
| The caching strategy used on the cache.
|
Protected Attributes |
CMAP_TYPE | map_ |
| The underlying map which needs to be cached.
|
CACHING_STRATEGY & | caching_strategy_ |
| The strategy to be followed for caching entries in the map.
|
Private Member Functions |
void | operator= (const ACMM< KEY, VALUE, CMAP_TYPE, ITERATOR_IMPL, REVERSE_ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES > &) |
| ACMM (const ACMM< KEY, VALUE, CMAP_TYPE, ITERATOR_IMPL, REVERSE_ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES > &) |
Friends |
class | ACE_Cache_Map_Iterator<KEY, VALUE, ITERATOR_IMPLEMENTATION, CACHING_STRATEGY, ATTRIBUTES> |
class | ACE_Cache_Map_Reverse_Iterator<KEY, VALUE, REVERSE_ITERATOR_IMPLEMENTATION, CACHING_STRATEGY, ATTRIBUTES> |
The <ace_cache_map_manager> will manage the map it contains and provide purging on demand from the map. The strategy for caching is decided by the user and provided to the Cache Manager. The Cache Manager acts as a agent and communicates between the Map and the Strategy for purging entries from the map. No locking mechanism provided since locking at this level isn't efficient. Locking has to be provided by the application.
template<class KEY, class VALUE, class CMAP_TYPE, class ITERATOR_IMPL, class REVERSE_ITERATOR_IMPL, class CACHING_STRATEGY, class ATTRIBUTES> |
ACE_Cache_Map_Manager< KEY, VALUE, CMAP_TYPE, ITERATOR_IMPL, REVERSE_ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES >::ACMM |
( |
const ACMM< KEY, VALUE, CMAP_TYPE, ITERATOR_IMPL, REVERSE_ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES > & |
|
) |
[private] |
|
template<class KEY, class VALUE, class CMAP_TYPE, class ITERATOR_IMPL, class REVERSE_ITERATOR_IMPL, class CACHING_STRATEGY, class ATTRIBUTES> |
void ACE_Cache_Map_Manager< KEY, VALUE, CMAP_TYPE, ITERATOR_IMPL, REVERSE_ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES >::operator= |
( |
const ACMM< KEY, VALUE, CMAP_TYPE, ITERATOR_IMPL, REVERSE_ITERATOR_IMPL, CACHING_STRATEGY, ATTRIBUTES > & |
|
) |
[private] |
|