Class ContainerAdapter.DefaultContext
java.lang.Object
com.tangosol.application.ContainerAdapter.DefaultContext
- All Implemented Interfaces:
Context,Context.ExtendedContext
- Enclosing class:
ContainerAdapter
public static class ContainerAdapter.DefaultContext
extends Object
implements Context.ExtendedContext
The
ContainerAdapter.DefaultContext represents the context for an application.- Since:
- Coherence 12.1.2
- Author:
- cf 2011.07.01
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.tangosol.application.Context
Context.ExtendedContext -
Constructor Summary
ConstructorsConstructorDescriptionDefaultContext(CacheFactoryBuilder builder, ClassLoader loader, String sAppName, String sCacheConfigURI, ServiceMonitor monitor, String sPofConfigURI, ContainerContext ctx) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected ExtensibleConfigurableCacheFactoryBuild the ExtensibleConfigurableCacheFactory to be used by this context.Return the name of the application.Return the cache configuration URI.Return theCacheFactoryBuilderin use.Return theClassLoaderin use.Return the correspondingConfigurableCacheFactory.Return theContainerContextassociated with the ContainerAdapter.Returns the default scope name to use.getNamedSerializer(String sName) Produces instances of a namedSerializer.Return the POF configuration URI.Return the keep-alive facility for the application services.com.tangosol.internal.net.ConfigurableCacheFactorySessionReturn theConfigurableCacheFactorySession.
-
Constructor Details
-
DefaultContext
public DefaultContext(CacheFactoryBuilder builder, ClassLoader loader, String sAppName, String sCacheConfigURI, ServiceMonitor monitor, String sPofConfigURI, ContainerContext ctx) Constructor.- Parameters:
builder- theCacheFactoryBuilderto useloader- theClassLoaderto usesAppName- the application name to usesCacheConfigURI- the cache configuration URImonitor- theServiceMonitorto usesPofConfigURI- the POF configuration URIctx- theContainerContextto use
-
-
Method Details
-
getConfigurableCacheFactory
Return the correspondingConfigurableCacheFactory. This method will return the same reference as a call toctx.getExtendedContext().getCacheFactoryBuilder(). getConfigurableCacheFactory(ctx.getClassLoader());- Specified by:
getConfigurableCacheFactoryin interfaceContext- Returns:
- the
ConfigurableCacheFactory
-
getCacheFactoryBuilder
Return theCacheFactoryBuilderin use.- Specified by:
getCacheFactoryBuilderin interfaceContext- Returns:
- the
CacheFactoryBuilder
-
getClassLoader
Return theClassLoaderin use.- Specified by:
getClassLoaderin interfaceContext- Returns:
- the
ClassLoader
-
getApplicationName
Return the name of the application.- Specified by:
getApplicationNamein interfaceContext- Returns:
- the name of the application
-
getServiceMonitor
Return the keep-alive facility for the application services.- Specified by:
getServiceMonitorin interfaceContext- Returns:
- the
ServiceMonitor
-
getPofConfigURI
Return the POF configuration URI.For advanced use cases, the resource identified by this URI can be found by calling:
ctx.getExtendedContext().getClassLoader().getResource(ctx.getPofConfigUri());- Specified by:
getPofConfigURIin interfaceContext- Returns:
- the POF configuration URI
-
getCacheConfigURI
Return the cache configuration URI.- Specified by:
getCacheConfigURIin interfaceContext- Returns:
- the cache configuration URI
-
getContainerContext
Return theContainerContextassociated with the ContainerAdapter.- Specified by:
getContainerContextin interfaceContext- Returns:
- the
ContainerContextinstance or null
-
getDefaultScope
Description copied from interface:ContextReturns the default scope name to use.- Specified by:
getDefaultScopein interfaceContext- Returns:
- the default scope name to use
-
getNamedSerializer
Description copied from interface:ContextProduces instances of a namedSerializer.- Specified by:
getNamedSerializerin interfaceContext- Parameters:
sName- the name of the serializer- Returns:
- an instance of a named
Serializer
-
getExtendedContext
- Specified by:
getExtendedContextin interfaceContext- Returns:
- the
Context.ExtendedContext
-
getSession
public com.tangosol.internal.net.ConfigurableCacheFactorySession getSession()Return theConfigurableCacheFactorySession.- Returns:
- the
ConfigurableCacheFactorySession
-
buildFactory
Build the ExtensibleConfigurableCacheFactory to be used by this context.- Returns:
- ExtensibleConfigurableCacheFactory instance
-