#include <coherence/net/cache/BundlingNamedCache.hpp>
Inherits WrapperNamedCache.
Public Types | ||||||||||
typedef spec::Handle | Handle | |||||||||
BundlingNamedCache Handle definition. | ||||||||||
typedef spec::View | View | |||||||||
BundlingNamedCache View definition. | ||||||||||
typedef spec::Holder | Holder | |||||||||
BundlingNamedCache Holder definition. | ||||||||||
typedef this_spec::Handle | Handle | |||||||||
WrapperNamedCache Handle definition. | ||||||||||
typedef this_spec::View | View | |||||||||
WrapperNamedCache View definition. | ||||||||||
typedef this_spec::Holder | Holder | |||||||||
WrapperNamedCache Holder definition. | ||||||||||
Public Member Functions | ||||||||||
virtual AbstractBundler::Handle | ensureGetBundler (int32_t cBundleThreshold) | |||||||||
Configure the bundler for the "get" operations. | ||||||||||
virtual AbstractBundler::Handle | ensurePutBundler (int32_t cBundleThreshold) | |||||||||
Configure the bundler for the "put" operations. | ||||||||||
virtual AbstractBundler::Handle | ensureRemoveBundler (int32_t cBundleThreshold) | |||||||||
Configure the bundler for the "remove" operations. | ||||||||||
virtual AbstractBundler::Handle | getGetBundler () | |||||||||
Obtain the bundler for the "get" operations. | ||||||||||
virtual AbstractBundler::Handle | getPutBundler () | |||||||||
Obtain the bundler for the "put" operations. | ||||||||||
virtual AbstractBundler::Handle | getRemoveBundler () | |||||||||
Obtain the bundler for the "remove" operations. | ||||||||||
virtual Object::Holder | get (Object::View vKey) | |||||||||
Return the value to which this map maps the specified key.
Return
| ||||||||||
virtual Map::View | getAll (Collection::View vColKeys) | |||||||||
virtual Object::Holder | put (Object::View vKey, Object::Holder ohValue) | |||||||||
Associate the specified value with the specified key in this map. If the map previously contained a mapping for this key, the old value is replaced by the specified value.
| ||||||||||
virtual void | putAll (Map::View vMap) | |||||||||
virtual Object::Holder | remove (Object::View vKey) | |||||||||
Remove the mapping for this key from this map if it is present.
Return the value to which the map previously associated the key, or
| ||||||||||
virtual void | release () | |||||||||
Release local resources associated with this instance of NamedCache. Releasing a cache makes it no longer usable, but does not affect the cache itself. In other words, all other references to the cache will still be valid, and the cache data is not affected by releasing the reference. Any attempt to use this reference afterward will result in an exception. Caches should be released by the same mechanism in which they were obtained. For example:
| ||||||||||
virtual void | destroy () | |||||||||
Release and destroy this instance of NamedCache. Warning: This method is used to completely destroy the specified cache across the cluster. All references in the entire cluster to this cache will be invalidated, the cached data will be cleared, and all resources will be released. Caches should be destroyed by the same mechanism in which they were obtained. For example:
| ||||||||||
Protected Member Functions | ||||||||||
BundlingNamedCache (NamedCache::Handle hCache) | ||||||||||
Construct a BundlingNamedCache based on the specified NamedCache. |
BundlingNamedCache | ( | NamedCache::Handle | hCache | ) | [protected] |
Construct a BundlingNamedCache based on the specified NamedCache.
hCache | the NamedCache that will be wrapped by this BundlingNamedCache |
virtual AbstractBundler::Handle ensureGetBundler | ( | int32_t | cBundleThreshold | ) | [virtual] |
Configure the bundler for the "get" operations.
If the bundler does not exist and bundling is enabled, it will be instantiated.
cBundleThreshold | the bundle size threshold; pass zero to disable "get" operation bundling |
virtual AbstractBundler::Handle ensurePutBundler | ( | int32_t | cBundleThreshold | ) | [virtual] |
Configure the bundler for the "put" operations.
If the bundler does not exist and bundling is enabled, it will be instantiated.
cBundleThreshold | the bundle size threshold; pass zero to disable "put" operation bundling |
virtual AbstractBundler::Handle ensureRemoveBundler | ( | int32_t | cBundleThreshold | ) | [virtual] |
Configure the bundler for the "remove" operations.
If the bundler does not exist and bundling is enabled, it will be instantiated.
cBundleThreshold | the bundle size threshold; pass zero to disable "remove" operation bundling |
virtual AbstractBundler::Handle getGetBundler | ( | ) | [virtual] |
Obtain the bundler for the "get" operations.
virtual AbstractBundler::Handle getPutBundler | ( | ) | [virtual] |
Obtain the bundler for the "put" operations.
virtual AbstractBundler::Handle getRemoveBundler | ( | ) | [virtual] |
Obtain the bundler for the "remove" operations.
virtual Object::Holder put | ( | Object::View | vKey, | |
Object::Holder | ohValue | |||
) | [virtual] |
Associate the specified value with the specified key in this map.
If the map previously contained a mapping for this key, the old value is replaced by the specified value.
vKey | key with which the specified value is to be associated. | |
ohValue | value to be associated with the specified key. |
NULL
if there was no mapping for key. A NULL
return can also indicate that the map previously associated NULL
with the specified key.coherence::lang::UnsupportedOperationException | if the put() operation is not supported by this map. |
Note: this method always returns NULL.
Reimplemented from WrapperNamedCache.
virtual Object::Holder remove | ( | Object::View | vKey | ) | [virtual] |
Remove the mapping for this key from this map if it is present.
Return the value to which the map previously associated the key, or NULL
if the map contained no mapping for this key. (A NULL
return can also indicate that the map previously associated NULL
with the specified key.) The map will not contain a mapping for the specified key once the call returns.
vKey | key whose mapping is to be removed from the map. |
NULL
if there was no mapping for key.coherence::lang::UnsupportedOperationException | if the remove() operation is not supported by this map. |
Note: this method always returns NULL.
Reimplemented from WrapperNamedCache.