Class NearScheme
- java.lang.Object
-
- com.tangosol.coherence.config.scheme.AbstractScheme
-
- com.tangosol.coherence.config.scheme.AbstractServiceScheme<D>
-
- com.tangosol.coherence.config.scheme.AbstractCachingScheme
-
- com.tangosol.coherence.config.scheme.AbstractLocalCachingScheme<T>
-
- com.tangosol.coherence.config.scheme.AbstractCompositeScheme<NearCache>
-
- com.tangosol.coherence.config.scheme.NearScheme
-
- All Implemented Interfaces:
BackingMapManagerBuilder
,BuilderCustomization<NearCache>
,MapBuilder
,NamedCacheBuilder
,ServiceBuilder
,CachingScheme
,ObservableCachingScheme
,Scheme
,ServiceScheme
public class NearScheme extends AbstractCompositeScheme<NearCache> implements NamedCacheBuilder
TheNearScheme
is used to realize (create) an instance of a NearCache.- Since:
- Coherence 12.1.2
- Author:
- pfm 2011.11.30
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.tangosol.coherence.config.builder.MapBuilder
MapBuilder.Dependencies
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
TYPE_NEAR
Service type for near caches.-
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 NearScheme()
-
Method Summary
-
Methods inherited from class com.tangosol.coherence.config.scheme.AbstractCompositeScheme
getBackScheme, getFrontScheme, setBackScheme, setFrontScheme, validate
-
Methods inherited from class com.tangosol.coherence.config.scheme.AbstractLocalCachingScheme
getCustomBuilder, getEventInterceptorBuilders, isRunningClusterNeeded, setCustomBuilder
-
Methods inherited from class com.tangosol.coherence.config.scheme.AbstractCachingScheme
getDefaultParameterResolver, getListenerBuilder, realizeMap, setListenerBuilder
-
Methods inherited from class com.tangosol.coherence.config.scheme.AbstractServiceScheme
ensureService, getDefaultServiceName, getScopedServiceName, getScopeName, getServiceDependencies, getServiceName, getXml, injectScopeNameIntoService, isAutoStart, realizeService, setAutoStart, setScopeName, setServiceDependencies, setServiceName, setXml
-
Methods inherited from class com.tangosol.coherence.config.scheme.AbstractScheme
getSchemeName, isAnonymous, setSchemeName, validate
-
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, getServiceName, isAutoStart
-
-
-
-
Field Detail
-
TYPE_NEAR
protected static final String TYPE_NEAR
Service type for near caches.- Since:
- 12.2.1.4.19
- See Also:
- Constant Field Values
-
-
Method Detail
-
getServiceBuilder
public ServiceBuilder getServiceBuilder()
Return theServiceBuilder
that is needed to build a service.- Specified by:
getServiceBuilder
in interfaceServiceScheme
- Overrides:
getServiceBuilder
in classAbstractServiceScheme
- Returns:
- the
ServiceBuilder
or null if the scheme does not support services.
-
getServiceType
public String getServiceType()
Description copied from class:AbstractLocalCachingScheme
Return the service type.- Specified by:
getServiceType
in interfaceServiceScheme
- Overrides:
getServiceType
in classAbstractLocalCachingScheme<NearCache>
- Returns:
- the service type
-
realizeBackingMapManager
public BackingMapManager realizeBackingMapManager(ConfigurableCacheFactory ccf)
Realize aBackingMapManager
to be scoped by the specifiedConfigurableCacheFactory
.- Specified by:
realizeBackingMapManager
in interfaceBackingMapManagerBuilder
- Overrides:
realizeBackingMapManager
in classAbstractCachingScheme
- Parameters:
ccf
- theConfigurableCacheFactory
- Returns:
- a
BackingMapManager
-
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
-
establishMapListeners
public void establishMapListeners(Map map, ParameterResolver resolver, MapBuilder.Dependencies dependencies)
Establishes an appropriateMapListener
(provided by theObservableCachingScheme.getListenerBuilder()
) on theObservableMap
that was produced by theObservableCachingScheme
.This method 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
.
- Specified by:
establishMapListeners
in interfaceObservableCachingScheme
- Overrides:
establishMapListeners
in classAbstractCachingScheme
- Parameters:
map
- anObservableMap
to which to add aMapListener
(if the map is not observable, no listeners are added)resolver
- theParameterResolver
to use for resolving builder parametersdependencies
- theMapBuilder
dependencies from which to obtain builder information- See Also:
Injectable
-
-
getInvalidationStrategy
public String getInvalidationStrategy(ParameterResolver resolver)
Return the invalidation strategy.- Parameters:
resolver
- the ParameterResolver- Returns:
- the invalidation strategy
-
setInvalidationStrategy
@Injectable public void setInvalidationStrategy(Expression<String> expr)
Set the invalidation strategy.- Parameters:
expr
- the invalidation strategy
-
-