#include <coherence/net/NamedCache.hpp>
Inherits CacheMap, ConcurrentMap, InvocableMap, QueryMap, and ObservableMap.
Inherited by ContinuousQueryCache [virtual]
, NearCache [virtual]
, WrapperNamedCache [virtual]
, and ConverterCollections::ConverterNamedCache [virtual]
.
These resources are expected to be managed in memory, and are typically composed of data that are also stored persistently in a database, or data that have been assembled or calculated at some significant cost, thus these resources are referred to as cached.
coherence::util::ConcurrentMap
Public Types | |
typedef spec::Handle | Handle |
NamedCache Handle definition. | |
typedef spec::View | View |
NamedCache View definition. | |
typedef spec::Holder | Holder |
NamedCache Holder definition. | |
typedef TypedHandle < CacheService > | CacheServiceHandle |
CacheService Handle definition. | |
typedef TypedHandle < const CacheService > | CacheServiceView |
CacheService View definition. | |
Public Member Functions | |
virtual String::View | getCacheName () const =0 |
Return the cache name. | |
virtual CacheServiceHandle | getCacheService ()=0 |
Return the CacheService that this NamedCache is a part of. | |
virtual CacheServiceView | getCacheService () const =0 |
Return the CacheService that this NamedCache is a part of. | |
virtual bool | isActive () const =0 |
Specifies whether or not the NamedCache is active. | |
virtual void | release ()=0 |
Release local resources associated with this instance of NamedCache. | |
virtual void | destroy ()=0 |
Release and destroy this instance of NamedCache. |
virtual String::View getCacheName | ( | ) | const [pure virtual] |
Return the cache name.
Implemented in ContinuousQueryCache, NearCache, WrapperNamedCache, and ConverterCollections::ConverterNamedCache.
virtual CacheServiceHandle getCacheService | ( | ) | [pure virtual] |
Return the CacheService that this NamedCache is a part of.
Implemented in ContinuousQueryCache, NearCache, WrapperNamedCache, and ConverterCollections::ConverterNamedCache.
virtual CacheServiceView getCacheService | ( | ) | const [pure virtual] |
Return the CacheService that this NamedCache is a part of.
Implemented in ContinuousQueryCache, NearCache, WrapperNamedCache, and ConverterCollections::ConverterNamedCache.
virtual bool isActive | ( | ) | const [pure virtual] |
Specifies whether or not the NamedCache is active.
Implemented in ContinuousQueryCache, NearCache, WrapperNamedCache, and ConverterCollections::ConverterNamedCache.
virtual void release | ( | ) | [pure virtual] |
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:
Implemented in BundlingNamedCache, ContinuousQueryCache, NearCache, WrapperNamedCache, and ConverterCollections::ConverterNamedCache.
virtual void destroy | ( | ) | [pure virtual] |
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:
Implemented in BundlingNamedCache, ContinuousQueryCache, NearCache, WrapperNamedCache, and ConverterCollections::ConverterNamedCache.