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
protected class ContainerAdapter.ContainerCacheFactoryBuilder extends ScopedCacheFactoryBuilder
ContainerCacheFactoryBuilder creates aConfigurableCacheFactoryinstance 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
Fields Modifier and Type Field Description protected CacheFactoryBuilderm_cfbDelegateTheCacheFactoryBuilderto be informed of anyConfigurableCacheFactoryinstances created.-
Fields inherited from class com.tangosol.net.ScopedCacheFactoryBuilder
f_scopeResolver, m_mapByLoader, m_mapConfigByLoader
-
Fields inherited from interface com.tangosol.net.CacheFactoryBuilder
URI_DEFAULT
-
Fields inherited from interface com.tangosol.net.SessionProvider
PRIORITY
-
-
Constructor Summary
Constructors Constructor Description ContainerCacheFactoryBuilder(CacheFactoryBuilder cfb)Construct a ContainerCacheFactoryBuilder instance with the providedCacheFactoryBuilderwhich is informed of anyConfigurableCacheFactoryinstances created.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected 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.ConfigurableCacheFactorysetConfigurableCacheFactory(ConfigurableCacheFactory ccf, String sConfigURI, ClassLoader loader, boolean fReplace)Dynamically set theConfigurableCacheFactoryfor a given URI and class loader.protected ConfigurableCacheFactorysetDefaultConfigurableCacheFactory(ConfigurableCacheFactory ccf, ClassLoader loader)Dynamically 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, setXmlConfig
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.tangosol.net.CacheFactoryBuilder
createSession, releaseSession
-
Methods inherited from interface com.tangosol.net.SessionProvider
close, compareTo, createSession, createSession, createSession, createSession, getPriority
-
-
-
-
Field Detail
-
m_cfbDelegate
protected CacheFactoryBuilder m_cfbDelegate
TheCacheFactoryBuilderto be informed of anyConfigurableCacheFactoryinstances created.
-
-
Constructor Detail
-
ContainerCacheFactoryBuilder
public ContainerCacheFactoryBuilder(CacheFactoryBuilder cfb)
Construct a ContainerCacheFactoryBuilder instance with the providedCacheFactoryBuilderwhich is informed of anyConfigurableCacheFactoryinstances created.- Parameters:
cfb- a CacheFactoryBuilder to be informed of anyConfigurableCacheFactoryinstances created
-
-
Method Detail
-
release
public void release(ConfigurableCacheFactory factory)
Release the specified ConfigurableCacheFactory.- Specified by:
releasein interfaceCacheFactoryBuilder- Overrides:
releasein classScopedCacheFactoryBuilder- Parameters:
factory- the ConfigurableCacheFactory to release
-
releaseAll
public void releaseAll(ClassLoader loader)
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
public void release(ConfigurableCacheFactory factory, boolean fShutdown)
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
-
-