Class OverflowScheme
- All Implemented Interfaces:
BackingMapManagerBuilder,BuilderCustomization,MapBuilder,NamedCacheBuilder,ServiceBuilder,CachingScheme,ObservableCachingScheme,Scheme,ServiceScheme
- 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 inherited from class com.tangosol.coherence.config.scheme.AbstractServiceScheme
m_serviceDependenciesFields inherited from interface com.tangosol.coherence.config.scheme.ServiceScheme
DELIM_APPLICATION_SCOPE, DELIM_DOMAIN_PARTITION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidestablishMapListeners(Map map, ParameterResolver resolver, MapBuilder.Dependencies dependencies) Establishes an appropriateMapListener(provided by theObservableCachingScheme.getListenerBuilder()) on theObservableMapthat was produced by theObservableCachingScheme.getExpiryDelay(ParameterResolver resolver) Return the amount of time since the last update that entries are kept by the cache before being expired.Return the scheme for the cache used to maintain information on cache misses.booleanisExpiryEnabled(ParameterResolver resolver) Return the expiry enabled flag.realizeMap(ParameterResolver resolver, MapBuilder.Dependencies dependencies) Realize aMapbased on the state of theMapBuilder, resolvable parameters and providedMapBuilder.Dependencies.voidsetExpiryDelay(Expression<Seconds> expr) Set the expiry delay.voidsetExpiryEnabled(Expression<Boolean> expr) Set the expiry enabled flag.voidsetMissCacheScheme(LocalScheme scheme) Set the miss cache scheme.Methods inherited from class com.tangosol.coherence.config.scheme.AbstractCompositeScheme
getBackScheme, getFrontScheme, setBackScheme, setFrontScheme, validateMethods inherited from class com.tangosol.coherence.config.scheme.AbstractLocalCachingScheme
getCustomBuilder, getEventInterceptorBuilders, getServiceType, isRunningClusterNeeded, setCustomBuilderMethods inherited from class com.tangosol.coherence.config.scheme.AbstractCachingScheme
getDefaultParameterResolver, getListenerBuilder, realizeBackingMapManager, realizeCache, setListenerBuilderMethods inherited from class com.tangosol.coherence.config.scheme.AbstractServiceScheme
ensureService, getDefaultServiceName, getScopedServiceName, getScopeName, getServiceBuilder, getServiceDependencies, getServiceName, getXml, injectScopeNameIntoService, isAutoStart, realizeService, setAutoStart, setScopeName, setServiceDependencies, setServiceName, setXmlMethods inherited from class com.tangosol.coherence.config.scheme.AbstractScheme
getSchemeName, isAnonymous, setSchemeName, validateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.tangosol.coherence.config.scheme.Scheme
getSchemeName, isAnonymousMethods inherited from interface com.tangosol.coherence.config.scheme.ServiceScheme
getScopedServiceName, getServiceBuilder, getServiceName, isAutoStart
-
Constructor Details
-
OverflowScheme
public OverflowScheme()
-
-
Method Details
-
realizeMap
Realize aMapbased on the state of theMapBuilder, resolvable parameters and providedMapBuilder.Dependencies.- Specified by:
realizeMapin interfaceMapBuilder- Overrides:
realizeMapin classAbstractCachingScheme- Parameters:
resolver- theParameterResolverdependencies- theMapBuilder.Dependenciesfor realizing theMap- Returns:
- a
Map
-
establishMapListeners
public void establishMapListeners(Map map, ParameterResolver resolver, MapBuilder.Dependencies dependencies) Establishes an appropriateMapListener(provided by theObservableCachingScheme.getListenerBuilder()) on theObservableMapthat 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
ResourceRegistryprovided by theConfigurableCacheFactory.
- Specified by:
establishMapListenersin interfaceObservableCachingScheme- Overrides:
establishMapListenersin classAbstractCachingScheme- Parameters:
map- anObservableMapto which to add aMapListener(if the map is not observable, no listeners are added)resolver- theParameterResolverto use for resolving builder parametersdependencies- theMapBuilderdependencies from which to obtain builder information- See Also:
-
-
getExpiryDelay
Return the amount of time since the last update that entries are kept by the cache before being expired. Entries that have expired are not accessible and are evicted the next time a client accesses the cache. Any attempt to read an expired entry results in a reloading of the entry from the CacheStore.- Parameters:
resolver- the ParameterResolver- Returns:
- the expiry delay
-
setExpiryDelay
Set the expiry delay.- Parameters:
expr- the expiry delay expression
-
isExpiryEnabled
Return the expiry enabled flag.- Parameters:
resolver- the ParameterResolver- Returns:
- true if expiry delay is enabled
-
setExpiryEnabled
Set the expiry enabled flag.- Parameters:
expr- the Boolean expression set to true if expiry delay is enabled
-
getMissCacheScheme
Return the scheme for the cache used to maintain information on cache misses. The miss-cache is used track keys which were not found in the cache store. The knowledge that a key is not in the cache store allows some operations to perform faster, as they can avoid querying the potentially slow cache store. A size-limited scheme may be used to control how many misses are cached. If unspecified no cache-miss data is maintained.- Returns:
- the miss cache scheme
-
setMissCacheScheme
Set the miss cache scheme.- Parameters:
scheme- the miss cache scheme
-