Package com.tangosol.application
Class ContainerAdapter.ContainerCacheFactoryBuilder
java.lang.Object
com.tangosol.net.ScopedCacheFactoryBuilder
com.tangosol.application.ContainerAdapter.ContainerCacheFactoryBuilder
- All Implemented Interfaces:
CacheFactoryBuilder,SessionProvider,Comparable<SessionProvider>
- Enclosing class:
ContainerAdapter
ContainerCacheFactoryBuilder creates a
ConfigurableCacheFactory
instance using the knowledge from this ContainerAdapter instance.
This builder is used exclusively by the ContainerAdapter.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.tangosol.net.SessionProvider
SessionProvider.Context, SessionProvider.DefaultContext, SessionProvider.Option, SessionProvider.Provider, SessionProvider.Providers -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CacheFactoryBuilderTheCacheFactoryBuilderto be informed of anyConfigurableCacheFactoryinstances created.Fields inherited from class com.tangosol.net.ScopedCacheFactoryBuilder
f_scopeResolver, m_mapByLoader, m_mapConfigByLoaderFields inherited from interface com.tangosol.net.CacheFactoryBuilder
URI_DEFAULTFields inherited from interface com.tangosol.net.SessionProvider
PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionConstruct a ContainerCacheFactoryBuilder instance with the providedCacheFactoryBuilderwhich is informed of anyConfigurableCacheFactoryinstances created. -
Method Summary
Modifier and TypeMethodDescriptionprotected ConfigurableCacheFactorybuildFactory(String sConfigURI, ClassLoader loader, ParameterResolver resolver) Construct and configure aConfigurableCacheFactoryfor the specified cache config URI andClassLoader.voidrelease(ConfigurableCacheFactory factory) Release the specified ConfigurableCacheFactory.voidrelease(ConfigurableCacheFactory factory, boolean fShutdown) Release the specified ConfigurableCacheFactory, optionally callingdisposebased onfShutdownvalue.voidreleaseAll(ClassLoader loader) Release all ConfigurableCacheFactory objects for a given ClassLoader.setConfigurableCacheFactory(ConfigurableCacheFactory ccf, String sConfigURI, ClassLoader loader, boolean fReplace) Dynamically set theConfigurableCacheFactoryfor a given URI and class loader.protected ConfigurableCacheFactoryDynamically set theConfigurableCacheFactoryfor the default URI and class loader, iff absent.Methods inherited from class com.tangosol.net.ScopedCacheFactoryBuilder
buildFactory, ensureConfigCCFMap, ensureConfigMap, getConfigurableCacheFactory, getConfigurableCacheFactory, getConfigurableCacheFactory, getConfigurableCacheFactoryConfig, getFactory, getScopeResolver, getXmlConfig, instantiateFactory, instantiateScopeResolver, loadConfigFromURI, resolveURI, resolveURL, setCacheConfiguration, setCacheConfiguration, setXmlConfigMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.tangosol.net.CacheFactoryBuilder
createSession, releaseSessionMethods inherited from interface com.tangosol.net.SessionProvider
close, compareTo, createSession, createSession, createSession, createSession, getPriority
-
Field Details
-
m_cfbDelegate
TheCacheFactoryBuilderto be informed of anyConfigurableCacheFactoryinstances created.
-
-
Constructor Details
-
ContainerCacheFactoryBuilder
Construct a ContainerCacheFactoryBuilder instance with the providedCacheFactoryBuilderwhich is informed of anyConfigurableCacheFactoryinstances created.- Parameters:
cfb- a CacheFactoryBuilder to be informed of anyConfigurableCacheFactoryinstances created
-
-
Method Details
-
release
Release the specified ConfigurableCacheFactory.- Specified by:
releasein interfaceCacheFactoryBuilder- Overrides:
releasein classScopedCacheFactoryBuilder- Parameters:
factory- the ConfigurableCacheFactory to release
-
releaseAll
Release all ConfigurableCacheFactory objects for a given ClassLoader.- Specified by:
releaseAllin interfaceCacheFactoryBuilder- Overrides:
releaseAllin classScopedCacheFactoryBuilder- Parameters:
loader- the class loader for which all associated cache factories should be released
-
buildFactory
protected ConfigurableCacheFactory buildFactory(String sConfigURI, ClassLoader loader, ParameterResolver resolver) Construct and configure aConfigurableCacheFactoryfor the specified cache config URI andClassLoader.- Overrides:
buildFactoryin classScopedCacheFactoryBuilder- Parameters:
sConfigURI- the URI to the cache configurationloader- theClassLoaderassociated with the factoryresolver- an optionalParameterResolverto use to resolve configuration parameters- Returns:
- a ConfigurableCacheFactory for the specified XML configuration
-
setConfigurableCacheFactory
public ConfigurableCacheFactory setConfigurableCacheFactory(ConfigurableCacheFactory ccf, String sConfigURI, ClassLoader loader, boolean fReplace) Dynamically set theConfigurableCacheFactoryfor a given URI and class loader. If a ConfigurableCacheFactory for the given URI and class loader already exists and the replacement is requested, the factory will be released.- Specified by:
setConfigurableCacheFactoryin interfaceCacheFactoryBuilder- Overrides:
setConfigurableCacheFactoryin classScopedCacheFactoryBuilder- Parameters:
ccf- the ConfigurableCacheFactory instancesConfigURI- the configuration URI; must not be nullloader- class loader for which the configuration should be used; must not be nullfReplace- specifies whether to replace a ConfigurableCacheFactory if one is already registered- Returns:
- the previous ConfigurableCacheFactory associated with the URI and loader, if any
-
release
Release the specified ConfigurableCacheFactory, optionally callingdisposebased onfShutdownvalue.- Parameters:
factory- the ConfigurableCacheFactory to releasefShutdown- whether to call dispose on the ConfigurableCacheFactory
-
setDefaultConfigurableCacheFactory
protected ConfigurableCacheFactory setDefaultConfigurableCacheFactory(ConfigurableCacheFactory ccf, ClassLoader loader) Dynamically set theConfigurableCacheFactoryfor the default URI and class loader, iff absent.- Parameters:
ccf- the ConfigurableCacheFactory instanceloader- theClassLoaderthe ConfigurableCacheFactory is linked against- Returns:
- the current ConfigurableCacheFactory associated with the default URI and loader
- Since:
- Coherence 12.1.2
-