Class CustomScheme
- All Implemented Interfaces:
BackingMapManagerBuilder
,BuilderCustomization<Map>
,MapBuilder
,NamedCacheBuilder
,ServiceBuilder
,CachingScheme
,ObservableCachingScheme
,Scheme
,ServiceScheme
A
CustomScheme
is an adapter for a ParameterizedBuilder
that
builds a Map
.
This class will automatically inject the following types and named values into realized classes that have been annotated with @Injectable.
-
BackingMapManagerContext
(optionally named "manager-context") -
ConfigurableCacheFactory
- Cache Name (as a
String
.class named "cache-name") - Context
ClassLoader
(optionally named "class-loader") -
ResourceRegistry
-
CacheConfig
- together with any other resource, named or otherwise, available
in the
ResourceRegistry
provided by theConfigurableCacheFactory
.
- Since:
- Coherence 12.1.2
- Author:
- pfm 2011.12.06
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.tangosol.coherence.config.builder.MapBuilder
MapBuilder.Dependencies
-
Field Summary
Fields inherited from class com.tangosol.coherence.config.scheme.AbstractServiceScheme
m_serviceDependencies
Fields inherited from interface com.tangosol.coherence.config.scheme.ServiceScheme
DELIM_APPLICATION_SCOPE, DELIM_DOMAIN_PARTITION
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionrealizeCache
(ParameterResolver resolver, MapBuilder.Dependencies dependencies) Realizes aNamedCache
(possibly "ensuring it") based on the state of the builder, the providedParameterResolver
andMapBuilder
dependencies.realizeMap
(ParameterResolver resolver, MapBuilder.Dependencies dependencies) Realize aMap
based on the state of theMapBuilder
, resolvable parameters and providedMapBuilder.Dependencies
.realizeService
(ParameterResolver resolver, ClassLoader loader, Cluster cluster) Realize (ensure) a Service.protected void
validate()
Validate the builder properties.Methods inherited from class com.tangosol.coherence.config.scheme.AbstractLocalCachingScheme
getCustomBuilder, getEventInterceptorBuilders, getServiceType, isRunningClusterNeeded, setCustomBuilder
Methods inherited from class com.tangosol.coherence.config.scheme.AbstractCachingScheme
establishMapListeners, getDefaultParameterResolver, getListenerBuilder, realizeBackingMapManager, setListenerBuilder, validate
Methods inherited from class com.tangosol.coherence.config.scheme.AbstractServiceScheme
ensureService, getDefaultServiceName, getScopedServiceName, getScopeName, getServiceBuilder, getServiceDependencies, getServiceName, getXml, injectScopeNameIntoService, isAutoStart, setAutoStart, setScopeName, setServiceDependencies, setServiceName, setXml
Methods inherited from class com.tangosol.coherence.config.scheme.AbstractScheme
getSchemeName, isAnonymous, setSchemeName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.tangosol.coherence.config.scheme.Scheme
getSchemeName, isAnonymous
Methods inherited from interface com.tangosol.coherence.config.scheme.ServiceScheme
getScopedServiceName, getServiceBuilder, getServiceName, isAutoStart
-
Constructor Details
-
CustomScheme
Construct aCustomScheme
.- Parameters:
bldr
- the InstanceBuilder to wrap
-
-
Method Details
-
realizeService
Realize (ensure) a Service. The returned Service is fully configured and ready to be used.- Specified by:
realizeService
in interfaceServiceBuilder
- Overrides:
realizeService
in classAbstractServiceScheme
- Parameters:
resolver
- the ParameterResolverloader
- the ClassLoadercluster
- the Cluster which will already be running if necessary- Returns:
- the Service
-
realizeCache
Realizes aNamedCache
(possibly "ensuring it") based on the state of the builder, the providedParameterResolver
andMapBuilder
dependencies.The
MapBuilder
dependencies are required to satisfy the requirement when realizing aNamedCache
additionally involves realizing one or more internalMap
s.- Specified by:
realizeCache
in interfaceNamedCacheBuilder
- Overrides:
realizeCache
in classAbstractCachingScheme
- Parameters:
resolver
- the ParameterResolverdependencies
- theMapBuilder
dependencies- Returns:
- a
NamedCache
-
realizeMap
Realize aMap
based on the state of theMapBuilder
, resolvable parameters and providedMapBuilder.Dependencies
.- Specified by:
realizeMap
in interfaceMapBuilder
- Overrides:
realizeMap
in classAbstractCachingScheme
- Parameters:
resolver
- theParameterResolver
dependencies
- theMapBuilder.Dependencies
for realizing theMap
- Returns:
- a
Map
-
validate
protected void validate()Validate the builder properties.- Overrides:
validate
in classAbstractScheme
-