Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


com.tangosol.net
Interface ConfigurableCacheFactory

All Known Implementing Classes:
DefaultConfigurableCacheFactory, ExtensibleConfigurableCacheFactory

public interface ConfigurableCacheFactory

An interface for cache factory.

Since:
Coherence 2.2
Author:
gg 2003.05.26, jh 2006.06.28
See Also:
DefaultConfigurableCacheFactory

Method Summary
 void activate()
          Activate prepares the factory to be used within a container and should be called before any other factory method.
 void destroyCache(NamedCache cache)
          Release and destroy this instance of NamedCache.
 void dispose()
          Dispose of this factory.
 NamedCache ensureCache(java.lang.String sCacheName, java.lang.ClassLoader loader)
          Ensure a cache for the given name.
 Service ensureService(java.lang.String sServiceName)
          Ensure a service for the given name.
 InterceptorRegistry getInterceptorRegistry()
          Return the InterceptorRegistry for this factory.
 ResourceRegistry getResourceRegistry()
          Return the ResourceRegistry for this factory.
 void releaseCache(NamedCache cache)
          Release a cache and its associated resources.

 

Method Detail

activate

void activate()
Activate prepares the factory to be used within a container and should be called before any other factory method. Note that this factory can only be activated once and disposed of once.
Throws:
java.lang.IllegalStateException - if this factory has already been activated
Since:
Coherence 12.1.2

dispose

void dispose()
Dispose of this factory. This will stop all services that were started by this factory and dispose of all resources registered via getResourceRegistry(). This factory may not be used after invoking dispose.
Throws:
java.lang.IllegalStateException - if this factory is not active
Since:
Coherence 12.1.2

ensureCache

NamedCache ensureCache(java.lang.String sCacheName,
                       java.lang.ClassLoader loader)
Ensure a cache for the given name.
Parameters:
sCacheName - the cache name
loader - ClassLoader that should be used to deserialize objects in the cache
Returns:
a NamedCache created

releaseCache

void releaseCache(NamedCache cache)
Release a cache and its associated resources.

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 the released cache reference afterword will result in an exception.

Parameters:
cache - the cache to release
Since:
Coherence 3.5.1

destroyCache

void destroyCache(NamedCache cache)
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 internal and associated resources will be released.

Parameters:
cache - the cache to release
Since:
Coherence 3.5.1

ensureService

Service ensureService(java.lang.String sServiceName)
Ensure a service for the given name.
Parameters:
sServiceName - the service name
Returns:
a Service created

getInterceptorRegistry

InterceptorRegistry getInterceptorRegistry()
Return the InterceptorRegistry for this factory. EventInterceptors registered with this registry will be scoped to services and caches created by this factory.
Returns:
the InterceptorRegistry for this factory
Since:
Coherence 12.1.2

getResourceRegistry

ResourceRegistry getResourceRegistry()
Return the ResourceRegistry for this factory.
Returns:
the ResourceRegistry for this factory
Since:
Coherence 12.1.2

Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.