Oracle® Fusion Middleware .NET API Reference for Oracle Coherence
12c (12.1.3.0.0)
E47892-01
Assembly: Coherence (in Coherence.dll) Version: 12.1.3.0 (12.1.3.0)
12c (12.1.3.0.0)
E47892-01
The DefaultConfigurableCacheFactory provides a facility to
access caches declared in a "cache-config.xsd" compliant configuration
file.
Namespace: Tangosol.NetAssembly: Coherence (in Coherence.dll) Version: 12.1.3.0 (12.1.3.0)
Syntax
C# |
---|
public class DefaultConfigurableCacheFactory : IConfigurableCacheFactory, IXmlConfigurable |
Remarks
This class is designed to be easily extendable with a collection of factory methods allowing subclasses to customize it by overriding any subset of cache instantiation routines or even allowing the addition of custom schemes.
There are various ways of using this factory:
IConfigurableCacheFactory factory = new DefaultConfigurableCacheFactory(path); INamedCache cacheOne = factory.EnsureCache("one"); INamedCache cacheTwo = factory.EnsureCache("two");
Using this approach allows an easy customization by extending the DefaultConfigurableCacheFactory and changing the instantiation line:
IConfigurableCacheFactory factory = new CustomConfigurableCacheFactory(); ...
Another option is using the static version of the "EnsureCache" call:
INamedCache cacheOne = CacheFactory.GetCache("one"); INamedCache cacheTwo = CacheFactory.GetCache("two");which uses an instance of IConfigurableCacheFactory obtained by the ConfigurableCacheFactory.