Interface ConfigurableCacheFactory
- 
- All Known Implementing Classes:
- DefaultConfigurableCacheFactory,- ExtensibleConfigurableCacheFactory
 
 public interface ConfigurableCacheFactoryAn interface for cache factory.- Since:
- Coherence 2.2
- Author:
- gg 2003.05.26, jh 2006.06.28
- See Also:
- DefaultConfigurableCacheFactory
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidactivate()Activate prepares the factory to be used within a container and should be called before any other factory method.voiddestroyCache(NamedCache<?,?> cache)Release and destroy this instance of NamedCache.voiddestroyTopic(NamedTopic<?> topic)Release and destroy this instance ofNamedTopic.voiddispose()Dispose of this factory.default <K,V>
 NamedCache<K,V>ensureCache(String sCacheName, ClassLoader loader)Ensure an cache for the given name and classloader (using raw types).<K,V>
 NamedCache<K,V>ensureCache(String sCacheName, ClassLoader loader, NamedMap.Option... options)Ensure an cache for the given name, classloader and options.ServiceensureService(String sServiceName)Ensure a service for the given name.default <V> NamedTopic<V>ensureTopic(String sName, NamedCollection.Option... options)Ensure an Object-based topic for the given name.<V> NamedTopic<V>ensureTopic(String sName, ClassLoader loader, NamedCollection.Option... options)Ensure an Object-based topic for the given name.default <K,V>
 NamedCache<K,V>ensureTypedCache(String sCacheName, ClassLoader loader, TypeAssertion<K,V> assertion)Ensure a cache for the given name satisfying the specified type assertion.InterceptorRegistrygetInterceptorRegistry()Return theInterceptorRegistryfor this factory.ResourceRegistrygetResourceRegistry()Return theResourceRegistryfor this factory.default StringgetScopeName()Return the scope name of this cache factory, if available.default booleanisActive()Returnstrueif thisConfigurableCacheFactoryis activated.booleanisCacheActive(String sCacheName, ClassLoader loader)Validate whether a cache with the given name is active in the context of the givenClassLoader.default booleanisDisposed()Return true if this factory has been disposed via invocation ofdispose().booleanisTopicActive(String sTopicName, ClassLoader loader)Validate whether a topic with the given name is active in the context of the givenClassLoader.voidreleaseCache(NamedCache<?,?> cache)Release a cache and its associated resources.voidreleaseTopic(NamedTopic<?> topic)Release aNamedTopicand its associated resources.
 
- 
- 
- 
Method Detail- 
activatevoid activate() Activate prepares the factory to be used within a container and should be called before any other factory method.- Since:
- Coherence 12.1.2
 
 - 
isActivedefault boolean isActive() Returnstrueif thisConfigurableCacheFactoryis activated.- Returns:
- trueif this- ConfigurableCacheFactoryis activated
 
 - 
disposevoid dispose() Dispose of this factory. This will stop all services that were started by this factory and dispose of all resources registered viagetResourceRegistry(). This factory may not be used after invoking dispose.- Since:
- Coherence 12.1.2
 
 - 
isDisposeddefault boolean isDisposed() Return true if this factory has been disposed via invocation ofdispose().- Returns:
- true if this factory has been disposed
 
 - 
ensureCachedefault <K,V> NamedCache<K,V> ensureCache(String sCacheName, ClassLoader loader) Ensure an cache for the given name and classloader (using raw types).- Parameters:
- sCacheName- the cache name
- loader- ClassLoader that should be used to deserialize objects in the cache
- Returns:
- a NamedCache created
 
 - 
ensureCache<K,V> NamedCache<K,V> ensureCache(String sCacheName, ClassLoader loader, NamedMap.Option... options) Ensure an cache for the given name, classloader and options.- Parameters:
- sCacheName- the cache name
- loader- ClassLoader that should be used to deserialize objects in the cache
- options- the- NamedMap.Options
- Returns:
- a NamedCache created
 
 - 
ensureTypedCachedefault <K,V> NamedCache<K,V> ensureTypedCache(String sCacheName, ClassLoader loader, TypeAssertion<K,V> assertion) Ensure a cache for the given name satisfying the specified type assertion.- Parameters:
- sCacheName- the cache name
- loader- the- ClassLoaderto use for deserializing cache entries
- assertion- the- TypeAssertionfor asserting the type of keys and values for the NamedCache
- Returns:
- a NamedCache created
- Since:
- Coherence 12.2.1
 
 - 
releaseCachevoid 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
 
 - 
destroyCachevoid 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
 
 - 
ensureTopicdefault <V> NamedTopic<V> ensureTopic(String sName, NamedCollection.Option... options) Ensure an Object-based topic for the given name.- Parameters:
- sName- the topic name
- options- the- NamedCollection.Options to control any optional topic configuration
- Returns:
- a NamedTopic created
- Since:
- Coherence 14.1.1
 
 - 
ensureTopic<V> NamedTopic<V> ensureTopic(String sName, ClassLoader loader, NamedCollection.Option... options) Ensure an Object-based topic for the given name.- Parameters:
- sName- the topic name
- loader- ClassLoader that should be used to deserialize objects in the cache
- options- the- NamedCollection.Options to control any optional topic configuration
- Returns:
- a NamedTopic created
- Since:
- Coherence 14.1.1
 
 - 
releaseTopicvoid releaseTopic(NamedTopic<?> topic) Release aNamedTopicand its associated resources.Releasing a topic makes it no longer usable, but does not affect the topic itself. In other words, all other references to the topic will still be valid, and the topic data is not affected by releasing the reference. Any attempt to use the released topic reference afterword will result in an exception. - Parameters:
- topic- the topic to release
- Since:
- Coherence 14.1.1
 
 - 
destroyTopicvoid destroyTopic(NamedTopic<?> topic) Release and destroy this instance ofNamedTopic.Warning: This method is used to completely destroy the specified topic across the cluster. All references in the entire cluster to this topic will be invalidated, the topic data will be cleared, and all internal and associated resources will be released. - Parameters:
- topic- the topic to release
- Since:
- Coherence 14.1.1
 
 - 
ensureServiceService ensureService(String sServiceName) Ensure a service for the given name.- Parameters:
- sServiceName- the service name
- Returns:
- a Service created
 
 - 
getInterceptorRegistryInterceptorRegistry getInterceptorRegistry() Return theInterceptorRegistryfor this factory.EventInterceptors registered with this registry will be scoped to services and caches created by this factory.- Returns:
- the InterceptorRegistryfor this factory
- Since:
- Coherence 12.1.2
 
 - 
getResourceRegistryResourceRegistry getResourceRegistry() Return theResourceRegistryfor this factory.- Returns:
- the ResourceRegistry for this factory
- Since:
- Coherence 12.1.2
 
 - 
isCacheActiveboolean isCacheActive(String sCacheName, ClassLoader loader) Validate whether a cache with the given name is active in the context of the givenClassLoader. The ClassLoader should be the same as provided to a previous call toensureCache(String, ClassLoader, NamedCache.Option...).- Parameters:
- sCacheName- the cache name
- loader- the ClassLoader used to originally obtain the cache
- Returns:
- true if cache is active in context of the provided ClassLoader
- Since:
- Coherence 12.2.1
 
 - 
isTopicActiveboolean isTopicActive(String sTopicName, ClassLoader loader) Validate whether a topic with the given name is active in the context of the givenClassLoader. The ClassLoader should be the same as provided to a previous call toensureTopic(String, ClassLoader, NamedTopic.Option...).- Parameters:
- sTopicName- the topic name
- loader- the ClassLoader used to originally obtain the topic
- Returns:
- true if topic is active in context of the provided ClassLoader
- Since:
- Coherence 20.12
 
 - 
getScopeNamedefault String getScopeName() Return the scope name of this cache factory, if available.- Returns:
- the scope name of this cache factory, if available; nullotherwise
 
 
- 
 
-