Class CustomScheme
-
- All Implemented Interfaces:
BackingMapManagerBuilder
,BuilderCustomization<Map>
,MapBuilder
,NamedCacheBuilder
,ServiceBuilder
,CachingScheme
,ObservableCachingScheme
,Scheme
,ServiceScheme
public class CustomScheme extends AbstractLocalCachingScheme<Map>
ACustomScheme
is an adapter for aParameterizedBuilder
that builds aMap
.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:
Injectable
-
-
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
Constructors Constructor Description CustomScheme(ParameterizedBuilder<Map> bldr)
Construct aCustomScheme
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NamedCache
realizeCache(ParameterResolver resolver, MapBuilder.Dependencies dependencies)
Realizes aNamedCache
(possibly "ensuring it") based on the state of the builder, the providedParameterResolver
andMapBuilder
dependencies.Map
realizeMap(ParameterResolver resolver, MapBuilder.Dependencies dependencies)
Realize aMap
based on the state of theMapBuilder
, resolvable parameters and providedMapBuilder.Dependencies
.Service
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 Detail
-
CustomScheme
public CustomScheme(ParameterizedBuilder<Map> bldr)
Construct aCustomScheme
.- Parameters:
bldr
- the InstanceBuilder to wrap
-
-
Method Detail
-
realizeService
public Service realizeService(ParameterResolver resolver, ClassLoader loader, Cluster cluster)
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
public NamedCache realizeCache(ParameterResolver resolver, MapBuilder.Dependencies dependencies)
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
public Map realizeMap(ParameterResolver resolver, MapBuilder.Dependencies dependencies)
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
-
-