Oracle Coherence for C++ API
Release 3.6.1.0

E18813-01

NamedCache Class Reference

#include <coherence/net/NamedCache.hpp>

Inherits CacheMap, ConcurrentMap, InvocableMap, QueryMap, and ObservableMap.

Inherited by ContinuousQueryCache [virtual], and ConverterCollections::ConverterNamedCache [virtual].

List of all members.


Detailed Description

A NamedCache is a Map that holds resources shared among members of a cluster.

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.

See also:
coherence::net::cache::CacheMap

coherence::util::ConcurrentMap

coherence::util::InvocableMap

coherence::util::ObservableMap

coherence::util::QueryMap

Author:
jh 2008.03.05

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.

Member Function Documentation

virtual String::View getCacheName (  )  const [pure virtual]

Return the cache name.

Returns:
the cache name

Implemented in ContinuousQueryCache, and ConverterCollections::ConverterNamedCache.

virtual CacheServiceHandle getCacheService (  )  [pure virtual]

Return the CacheService that this NamedCache is a part of.

Returns:
the CacheService

Implemented in ContinuousQueryCache, and ConverterCollections::ConverterNamedCache.

virtual CacheServiceView getCacheService (  )  const [pure virtual]

Return the CacheService that this NamedCache is a part of.

Returns:
the CacheService

Implemented in ContinuousQueryCache, and ConverterCollections::ConverterNamedCache.

virtual bool isActive (  )  const [pure virtual]

Specifies whether or not the NamedCache is active.

Returns:
true if the NamedCache is active; false otherwise

Implemented in ContinuousQueryCache, 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:

Except for the case where the application code explicitly allocated the cache, this method should not be called by application code.
See also:
CacheFactory::releaseCache

ConfigurableCacheFactory::releaseCache

Implemented in ContinuousQueryCache, 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:

Except for the case where the application code explicitly allocated the cache, this method should not be called by application code.
See also:
CacheService::destroyCache

Implemented in ContinuousQueryCache, and ConverterCollections::ConverterNamedCache.


The documentation for this class was generated from the following file:
Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.