Package com.tangosol.net
Interface CacheFactoryBuilder
- All Superinterfaces:
 Comparable<SessionProvider>,SessionProvider
- All Known Implementing Classes:
 DefaultCacheFactoryBuilder,ScopedCacheFactoryBuilder,SingletonCacheFactoryBuilder
CacheFactoryBuilder provides the means for building and managing configurable
 cache factories across class loaders in a pluggable fashion.
 
This is an advanced facility that could be used within J2EE or OSGi containers to provide a class loader based application isolation.
- Since:
 - Coherence 3.5.1
 - Author:
 - gg,rhl 2009.07.14
 
- 
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
FieldsFields inherited from interface com.tangosol.net.SessionProvider
PRIORITY - 
Method Summary
Modifier and TypeMethodDescriptiondefault SessionProvider.ContextcreateSession(SessionConfiguration configuration, SessionProvider.Context context) Create aSessionfrom the specified configuration.Return the default ConfigurableCacheFactory for a given class loader.getConfigurableCacheFactory(String sConfigURI, ClassLoader loader) Return the ConfigurableCacheFactory for a given URI and class loader.getConfigurableCacheFactory(String sConfigURI, ClassLoader loader, ParameterResolver resolver) Return the ConfigurableCacheFactory for a given URI and class loader.voidrelease(ConfigurableCacheFactory factory) Release the specified ConfigurableCacheFactory.voidreleaseAll(ClassLoader loader) Release all ConfigurableCacheFactory objects for a given ClassLoader.default voidreleaseSession(Session session) Release theSession.voidsetCacheConfiguration(ClassLoader loader, XmlElement xmlConfig) Dynamically set the default cache configuration for a given class loader.voidsetCacheConfiguration(String sConfigURI, ClassLoader loader, XmlElement xmlConfig) Dynamically set the cache configuration for a given URI and class loader.setConfigurableCacheFactory(ConfigurableCacheFactory ccf, String sConfigURI, ClassLoader loader, boolean fReplace) Dynamically set theConfigurableCacheFactoryfor a given URI and class loader.Methods inherited from interface com.tangosol.net.SessionProvider
close, compareTo, createSession, createSession, createSession, createSession, getPriority 
- 
Field Details
- 
URI_DEFAULT
Default URI identifier.- See Also:
 
 
 - 
 - 
Method Details
- 
getConfigurableCacheFactory
Return the default ConfigurableCacheFactory for a given class loader.- Parameters:
 loader- class loader for which the configuration should be used; must not be null- Returns:
 - the default ConfigurableCacheFactory for a given class loader
 
 - 
getConfigurableCacheFactory
Return the ConfigurableCacheFactory for a given URI and class loader.- Parameters:
 sConfigURI- the configuration URI; must not be nullloader- class loader for which the configuration should be used; must not be null- Returns:
 - the ConfigurableCacheFactory for a given URI and class loader
 
 - 
getConfigurableCacheFactory
ConfigurableCacheFactory getConfigurableCacheFactory(String sConfigURI, ClassLoader loader, ParameterResolver resolver) Return the ConfigurableCacheFactory for a given URI and class loader.- Parameters:
 sConfigURI- the configuration URI; must not be nullloader- class loader for which the configuration should be used; must not be nullresolver- the optionalParameterResolverto use to resolve configuration parameters- Returns:
 - the ConfigurableCacheFactory for a given URI and class loader
 
 - 
setCacheConfiguration
Dynamically set the default cache configuration for a given class loader. If a ConfigurableCacheFactory for the given class loader already exists, the factory will be released.- Parameters:
 loader- class loader for which the configuration should be used; must not be nullxmlConfig- cache configuration in xml element format
 - 
setCacheConfiguration
Dynamically set the cache configuration for a given URI and class loader. If a ConfigurableCacheFactory for the given URI and class loader already exists, the factory will be released.- Parameters:
 sConfigURI- the configuration URI; must not be nullloader- class loader for which the configuration should be used; must not be nullxmlConfig- cache configuration in xml element format
 - 
setConfigurableCacheFactory
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.- 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
 - Since:
 - Coherence 12.1.2
 
 - 
releaseAll
Release all ConfigurableCacheFactory objects for a given ClassLoader.- Parameters:
 loader- the class loader for which all associated cache factories should be released
 - 
release
Release the specified ConfigurableCacheFactory.- Parameters:
 factory- the ConfigurableCacheFactory to release
 - 
createSession
default SessionProvider.Context createSession(SessionConfiguration configuration, SessionProvider.Context context) Description copied from interface:SessionProviderCreate aSessionfrom the specified configuration.The return value is a
SessionProvider.Contextthat may be the same context passed in. If the provider could create aSessionthe context will be completed and contain a session. If the provider cannot create a session the context will not be completed. If the provider could not create a session and no other providers should be tried then the result context will be completed without a session.- Specified by:
 createSessionin interfaceSessionProvider- Parameters:
 configuration- the configuration to use to create the sessioncontext- theSessionProvider.Contextto use when creating the session- Returns:
 - the resulting 
SessionProvider.Contexteither not completed, completed with aSessionor completed empty. 
 - 
releaseSession
Description copied from interface:SessionProviderRelease theSession.- Specified by:
 releaseSessionin interfaceSessionProvider- Parameters:
 session- theSessionto release
 
 -