Class OverflowScheme
- 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
-
- com.tangosol.coherence.config.scheme.OverflowScheme
-
- All Implemented Interfaces:
BackingMapManagerBuilder,BuilderCustomization,MapBuilder,NamedCacheBuilder,ServiceBuilder,CachingScheme,ObservableCachingScheme,Scheme,ServiceScheme
public class OverflowScheme extends AbstractCompositeScheme
- 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_serviceDependencies
-
Fields inherited from interface com.tangosol.coherence.config.scheme.ServiceScheme
DELIM_APPLICATION_SCOPE, DELIM_DOMAIN_PARTITION
-
-
Constructor Summary
Constructors Constructor Description OverflowScheme()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidestablishMapListeners(Map map, ParameterResolver resolver, MapBuilder.Dependencies dependencies)Establishes an appropriateMapListener(provided by theObservableCachingScheme.getListenerBuilder()) on theObservableMapthat was produced by theObservableCachingScheme.SecondsgetExpiryDelay(ParameterResolver resolver)Return the amount of time since the last update that entries are kept by the cache before being expired.LocalSchemegetMissCacheScheme()Return the scheme for the cache used to maintain information on cache misses.booleanisExpiryEnabled(ParameterResolver resolver)Return the expiry enabled flag.MaprealizeMap(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, validate
-
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
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
-
-
-
-
Method Detail
-
realizeMap
public Map realizeMap(ParameterResolver resolver, MapBuilder.Dependencies dependencies)
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:
Injectable
-
-
getExpiryDelay
public Seconds getExpiryDelay(ParameterResolver resolver)
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
@Injectable public void setExpiryDelay(Expression<Seconds> expr)
Set the expiry delay.- Parameters:
expr- the expiry delay expression
-
isExpiryEnabled
public boolean isExpiryEnabled(ParameterResolver resolver)
Return the expiry enabled flag.- Parameters:
resolver- the ParameterResolver- Returns:
- true if expiry delay is enabled
-
setExpiryEnabled
@Injectable public void setExpiryEnabled(Expression<Boolean> expr)
Set the expiry enabled flag.- Parameters:
expr- the Boolean expression set to true if expiry delay is enabled
-
getMissCacheScheme
public LocalScheme 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
@Injectable("miss-cache-scheme") public void setMissCacheScheme(LocalScheme scheme)
Set the miss cache scheme.- Parameters:
scheme- the miss cache scheme
-
-