Oracle® Coherence .NET API Reference Release 3.7.1
E22844-03

Factory for the Oracle Coherence™ for .NET product.

Namespace:  Tangosol.Net
Assembly:  Coherence (in Coherence.dll) Version: 3.7.1.23 (3.7.1.23)

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:

    GetService(String)

Inheritance Hierarchy

System..::.Object
  Tangosol.Net..::.CacheFactory

See Also