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 aConfigurableCacheFactory
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
Fields Modifier and Type Field Description protected CacheFactoryBuilder
m_cfbDelegate
TheCacheFactoryBuilder
to be informed of anyConfigurableCacheFactory
instances 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 providedCacheFactoryBuilder
which is informed of anyConfigurableCacheFactory
instances created.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ConfigurableCacheFactory
buildFactory(String sConfigURI, ClassLoader loader, ParameterResolver resolver)
Construct and configure aConfigurableCacheFactory
for the specified cache config URI andClassLoader
.void
release(ConfigurableCacheFactory factory)
Release the specified ConfigurableCacheFactory.void
release(ConfigurableCacheFactory factory, boolean fShutdown)
Release the specified ConfigurableCacheFactory, optionally callingdispose
based onfShutdown
value.void
releaseAll(ClassLoader loader)
Release all ConfigurableCacheFactory objects for a given ClassLoader.ConfigurableCacheFactory
setConfigurableCacheFactory(ConfigurableCacheFactory ccf, String sConfigURI, ClassLoader loader, boolean fReplace)
Dynamically set theConfigurableCacheFactory
for a given URI and class loader.protected ConfigurableCacheFactory
setDefaultConfigurableCacheFactory(ConfigurableCacheFactory ccf, ClassLoader loader)
Dynamically set theConfigurableCacheFactory
for 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
TheCacheFactoryBuilder
to be informed of anyConfigurableCacheFactory
instances created.
-
-
Constructor Detail
-
ContainerCacheFactoryBuilder
public ContainerCacheFactoryBuilder(CacheFactoryBuilder cfb)
Construct a ContainerCacheFactoryBuilder instance with the providedCacheFactoryBuilder
which is informed of anyConfigurableCacheFactory
instances created.- Parameters:
cfb
- a CacheFactoryBuilder to be informed of anyConfigurableCacheFactory
instances created
-
-
Method Detail
-
release
public void release(ConfigurableCacheFactory factory)
Release the specified ConfigurableCacheFactory.- Specified by:
release
in interfaceCacheFactoryBuilder
- Overrides:
release
in classScopedCacheFactoryBuilder
- Parameters:
factory
- the ConfigurableCacheFactory to release
-
releaseAll
public void releaseAll(ClassLoader loader)
Release all ConfigurableCacheFactory objects for a given ClassLoader.- Specified by:
releaseAll
in interfaceCacheFactoryBuilder
- Overrides:
releaseAll
in 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 aConfigurableCacheFactory
for the specified cache config URI andClassLoader
.- Overrides:
buildFactory
in classScopedCacheFactoryBuilder
- Parameters:
sConfigURI
- the URI to the cache configurationloader
- theClassLoader
associated with the factoryresolver
- an optionalParameterResolver
to 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 theConfigurableCacheFactory
for 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:
setConfigurableCacheFactory
in interfaceCacheFactoryBuilder
- Overrides:
setConfigurableCacheFactory
in 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 callingdispose
based onfShutdown
value.- Parameters:
factory
- the ConfigurableCacheFactory to releasefShutdown
- whether to call dispose on the ConfigurableCacheFactory
-
setDefaultConfigurableCacheFactory
protected ConfigurableCacheFactory setDefaultConfigurableCacheFactory(ConfigurableCacheFactory ccf, ClassLoader loader)
Dynamically set theConfigurableCacheFactory
for the default URI and class loader, iff absent.- Parameters:
ccf
- the ConfigurableCacheFactory instanceloader
- theClassLoader
the ConfigurableCacheFactory is linked against- Returns:
- the current ConfigurableCacheFactory associated with the default URI and loader
- Since:
- Coherence 12.1.2
-
-