#include <coherence/net/cache/WrapperNamedCache.hpp>
Inherits Object, and NamedCache.
Inherited by BundlingNamedCache.
Public Types | |
typedef spec::Handle | Handle |
WrapperNamedCache Handle definition. | |
typedef spec::View | View |
WrapperNamedCache View definition. | |
typedef spec::Holder | Holder |
WrapperNamedCache Holder definition. | |
Public Member Functions | |
virtual size32_t | size () const |
virtual bool | isEmpty () const |
virtual bool | containsKey (Object::View vKey) const |
virtual bool | containsValue (Object::View vValue) const |
virtual Object::Holder | get (Object::View vKey) const |
virtual Object::Holder | get (Object::View vKey) |
virtual Object::Holder | put (Object::View vKey, Object::Holder ohValue) |
virtual Object::Holder | remove (Object::View vKey) |
virtual void | putAll (Map::View vMap) |
virtual void | clear () |
virtual Set::View | keySet () const |
virtual Set::Handle | keySet () |
virtual Collection::View | values () const |
virtual Collection::Handle | values () |
virtual Set::View | entrySet () const |
virtual Set::Handle | entrySet () |
virtual Map::View | getAll (Collection::View vKeys) const |
virtual Object::Holder | put (Object::View vKey, Object::Holder ohValue, int64_t cMillis) |
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:
| |
virtual String::View | getCacheName () const |
Return the cache name.
| |
virtual bool | isActive () const |
Specifies whether or not the NamedCache is active.
| |
virtual NamedCache::CacheServiceHandle | getCacheService () |
Return the CacheService that this NamedCache is a part of.
| |
virtual NamedCache::CacheServiceView | getCacheService () const |
Return the CacheService that this NamedCache is a part of.
| |
virtual bool | lock (Object::View vKey, int64_t cWait) const |
virtual bool | lock (Object::View vKey) const |
virtual bool | unlock (Object::View vKey) const |
virtual Object::Holder | invoke (Object::View vKey, EntryProcessor::Handle hAgent) |
virtual Map::View | invokeAll (Collection::View vCollKeys, EntryProcessor::Handle hAgent) |
virtual Map::View | invokeAll (Filter::View vFilter, EntryProcessor::Handle hAgent) |
virtual Object::Holder | aggregate (Collection::View vCollKeys, EntryAggregator::Handle hAgent) const |
virtual Object::Holder | aggregate (Filter::View vFilter, EntryAggregator::Handle hAgent) const |
virtual Set::View | keySet (Filter::View vFilter) const |
virtual Set::View | entrySet (Filter::View vFilter) const |
virtual Set::View | entrySet (Filter::View vFilter, Comparator::View vComparator) const |
virtual void | addIndex (ValueExtractor::View vExtractor, bool fOrdered, Comparator::View vComparator) |
virtual void | removeIndex (ValueExtractor::View vExtractor) |
virtual void | addKeyListener (MapListener::Handle hListener, Object::View vKey, bool fLite) |
virtual void | removeKeyListener (MapListener::Handle hListener, Object::View vKey) |
virtual void | addMapListener (MapListener::Handle hListener) |
virtual void | removeMapListener (MapListener::Handle hListener) |
virtual void | addFilterListener (MapListener::Handle hListener, Filter::View vFilter=NULL, bool fLite=false) |
virtual void | removeFilterListener (MapListener::Handle hListener, Filter::View vFilter=NULL) |
virtual TypedHandle < const String > | toString () const |
Output a human-readable description of this Object to the given stream. Note that when overriding this method the return type must be TypedHandle<const String> rather then String::View. These two types are assignment compatible but not equivalent and declaring the override with String::View will not be a compatible override. coherence::lang::operator<<(std::ostream, Object::View) is defined and will call into the toString method, to output Objects. If a managed String object is desired, the COH_TO_STRING macro can be used to build up a String from streamable contents and is generally how toString() will be implemented.
Object::View vKey = ... Object::View vValue = ... std::cout << vKey << " = " << vValue << std::endl; String::View vs = COH_TO_STRING(vKey << " = " << vValue); The COH_TO_STRING macro is also the most common way to implement the toString method. For example:
virtual TypedHandle<const String> Person::toString() const { return COH_TO_STRING("Name: " << f_sName << " SSN: " << f_nSSN); }
| |
virtual NamedCache::Handle | getNamedCache () |
Get the actual (wrapped) named cache. | |
virtual NamedCache::View | getNamedCache () const |
Get the actual (wrapped) named cache. | |
Protected Member Functions | |
WrapperNamedCache (NamedCache::Handle hCache) | |
Create a new WrapperNamedCache. | |
Protected Attributes | |
FinalHandle< NamedCache > | f_hNamedCache |
Actual (wrapped) NamedCache. |
WrapperNamedCache | ( | NamedCache::Handle | hCache | ) | [protected] |
Create a new WrapperNamedCache.
hCache | the NamedCache that will be wrapped by this WrapperNamedCache |
virtual NamedCache::Handle getNamedCache | ( | ) | [virtual] |
virtual NamedCache::View getNamedCache | ( | ) | const [virtual] |