12c (12.2.1.4.0)
E90869-02
Namespace: Tangosol.Net
Assembly: Coherence (in Coherence.dll) Version: 12.2.1.4014 (12.2.1.4014)
Syntax
C# |
---|
public abstract class CacheFactory |
Remarks
One of the most common functions provided by the CacheFactory is ability to obtain an instance of a cache. There are various cache services and cache topologies that are supported by Coherence.
To get a cache reference use the GetCache(String) method.
This approach that has a lot of advantages over service type specific methods described further below because:
- complex cache topology could be configured declaratively in the cache configuration XML rather then programmaticaly via API;
- the caller's code could become completely generic and agnostic to the cache topology;
- the cache topology decision could be deferred and made much later in the development cycle without changing the application code.
When a cache is no longer used, it is preferrable to call ReleaseCache(INamedCache) to release the associated resources. To destroy all instances of the cache across the cluster, use DestroyCache(INamedCache).
Other services:
- Invocation -
Invocation service provides the means for invoking and monitoring
execution of classes on specified nodes across a cluster.
The following factory method returns an instance of Invocation service:
Inheritance Hierarchy
Tangosol.Net..::..CacheFactory