Class BackingMapScheme
- 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
-
- com.tangosol.coherence.config.scheme.BackingMapScheme
-
- All Implemented Interfaces:
BackingMapManagerBuilder
,BuilderCustomization
,MapBuilder
,NamedCacheBuilder
,ServiceBuilder
,CachingScheme
,ObservableCachingScheme
,Scheme
,ServiceScheme
public class BackingMapScheme extends AbstractLocalCachingScheme
TheBackingMapScheme
class is responsible for building a fully configured instance of a backing map.- 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 static int
CUSTOM
A custom backup storage.static int
FILE_MAPPED
A file mapped backup storage.static int
FLASHJOURNAL
A Flash Journal backup storage.static int
OFF_HEAP
An off-heap backup storage.static int
ON_HEAP
An on-heap backup storage.static int
RAMJOURNAL
A Ram Journal backup storage.static int
SCHEME
A referenced scheme provides backup storage.-
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 BackingMapScheme()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
etReadLocatorBuilder(ReadLocatorBuilder bldrReadLocator)
Sets thebuilder
that is capable of building BiFunction's that return the Member reads for a partitioned cache should be targeted against.CachingScheme
getInnerScheme()
Return the inner scheme.ReadLocatorBuilder
getReadLocatorBuilder()
Return a builder that is capable of building BiFunction's that return the Member reads for a partitioned cache should be targeted against.Expression<String>
getStorageAccessAuthorizer()
Obtains theExpression
defining the name of theStorageAccessAuthorizer
.Boolean
isFederateApplySynthetic(ParameterResolver resolver)
Return true iff received federated changes should be applied locally as synthetic updates.boolean
isPartitioned(ParameterResolver resolver, boolean fDefault)
Return true if the partitioned flag is set explicitly or a journal map is used.Boolean
isSlidingExpiry(ParameterResolver resolver)
Return true iff sliding expiry is enabled.boolean
isTransient(ParameterResolver resolver)
Return true if the backing map is transient.Map
realizeMap(ParameterResolver resolver, MapBuilder.Dependencies dependencies)
Realize aMap
based on the state of theMapBuilder
, resolvable parameters and providedMapBuilder.Dependencies
.void
setFederateApplySynthetic(Expression<Boolean> expr)
Set whether incoming federated changes should be applied locally as synthetic updates.void
setInnerScheme(CachingScheme scheme)
Set the inner scheme.void
setPartitioned(Expression<String> expr)
Set the partitioned string.void
setSlidingExpiry(Expression<Boolean> expr)
Set the SlidingExpiry flag.void
setStorageAccessAuthorizer(Expression<String> exprStorageAccessAuthorizer)
Sets theExpression
defining the name of theStorageAccessAuthorizer
.void
setTransient(Expression<Boolean> expr)
Set the transient flag.protected void
validate(ParameterResolver resolver)
Validate the 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, realizeCache, setListenerBuilder
-
Methods inherited from class com.tangosol.coherence.config.scheme.AbstractServiceScheme
ensureService, getDefaultServiceName, getScopedServiceName, getScopeName, getServiceBuilder, 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, getServiceBuilder, getServiceName, isAutoStart
-
-
-
-
Field Detail
-
ON_HEAP
public static final int ON_HEAP
An on-heap backup storage.- See Also:
- Constant Field Values
-
OFF_HEAP
public static final int OFF_HEAP
An off-heap backup storage.- See Also:
- Constant Field Values
-
FILE_MAPPED
public static final int FILE_MAPPED
A file mapped backup storage.- See Also:
- Constant Field Values
-
CUSTOM
public static final int CUSTOM
A custom backup storage.- See Also:
- Constant Field Values
-
SCHEME
public static final int SCHEME
A referenced scheme provides backup storage.- See Also:
- Constant Field Values
-
FLASHJOURNAL
public static final int FLASHJOURNAL
A Flash Journal backup storage.- See Also:
- Constant Field Values
-
RAMJOURNAL
public static final int RAMJOURNAL
A Ram Journal backup storage.- See Also:
- Constant Field Values
-
-
Method Detail
-
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
-
getInnerScheme
public CachingScheme getInnerScheme()
Return the inner scheme.- Returns:
- the inner scheme
-
setInnerScheme
public void setInnerScheme(CachingScheme scheme)
Set the inner scheme.- Parameters:
scheme
- the inner scheme
-
setPartitioned
@Injectable public void setPartitioned(Expression<String> expr)
Set the partitioned string.- Parameters:
expr
- the Boolean expression set to 'true' or 'observable' if the backing map is partitioned
-
isPartitioned
public boolean isPartitioned(ParameterResolver resolver, boolean fDefault)
Return true if the partitioned flag is set explicitly or a journal map is used.- Parameters:
resolver
- the ParameterResolverfDefault
- the default partitioned flag- Returns:
- true if the map is partitioned
-
isTransient
public boolean isTransient(ParameterResolver resolver)
Return true if the backing map is transient.- Parameters:
resolver
- the ParameterResolver- Returns:
- true if the backing map is transient
-
setTransient
@Injectable public void setTransient(Expression<Boolean> expr)
Set the transient flag.- Parameters:
expr
- true to make the backing map transient.
-
isSlidingExpiry
public Boolean isSlidingExpiry(ParameterResolver resolver)
Return true iff sliding expiry is enabled.- Parameters:
resolver
- the ParameterResolver- Returns:
- true iff sliding expiry is enabled
-
setSlidingExpiry
@Injectable("sliding-expiry") public void setSlidingExpiry(Expression<Boolean> expr)
Set the SlidingExpiry flag.- Parameters:
expr
- true to enable sliding expiry for the backing map
-
isFederateApplySynthetic
public Boolean isFederateApplySynthetic(ParameterResolver resolver)
Return true iff received federated changes should be applied locally as synthetic updates.- Parameters:
resolver
- the ParameterResolver- Returns:
- true iff received federated changes should be applied locally as synthetic updates
- Since:
- 12.2.1.4
-
setFederateApplySynthetic
@Injectable("federate-apply-synthetic") public void setFederateApplySynthetic(Expression<Boolean> expr)
Set whether incoming federated changes should be applied locally as synthetic updates.- Parameters:
expr
- true to apply incoming federated changes as synthetic- Since:
- 12.2.1.4
-
getStorageAccessAuthorizer
public Expression<String> getStorageAccessAuthorizer()
Obtains theExpression
defining the name of theStorageAccessAuthorizer
.- Returns:
- the name of the
StorageAccessAuthorizer
ornull
if one has not been configured.
-
setStorageAccessAuthorizer
@Injectable("storage-authorizer") public void setStorageAccessAuthorizer(Expression<String> exprStorageAccessAuthorizer)
Sets theExpression
defining the name of theStorageAccessAuthorizer
.- Parameters:
exprStorageAccessAuthorizer
- theExpression
-
getReadLocatorBuilder
public ReadLocatorBuilder getReadLocatorBuilder()
Return a builder that is capable of building BiFunction's that return the Member reads for a partitioned cache should be targeted against.- Returns:
- a builder that is capable of building BiFunction's that return the Member reads for a partitioned cache should be targeted against
-
etReadLocatorBuilder
@Injectable("read-locator") public void etReadLocatorBuilder(ReadLocatorBuilder bldrReadLocator)
Sets thebuilder
that is capable of building BiFunction's that return the Member reads for a partitioned cache should be targeted against.- Parameters:
bldrReadLocator
- thebuilder
-
validate
protected void validate(ParameterResolver resolver)
Validate the properties.- Overrides:
validate
in classAbstractCachingScheme
- Parameters:
resolver
- the ParameterResolver needed to resolve expressions
-
-