Skip navigation links
com.tangosol.coherence.config.scheme
Class OverflowScheme
java.lang.Object
com.tangosol.coherence.config.scheme.AbstractScheme
com.tangosol.coherence.config.scheme.AbstractServiceScheme
com.tangosol.coherence.config.scheme.AbstractCachingScheme
com.tangosol.coherence.config.scheme.AbstractLocalCachingScheme
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
The OverflowScheme
is used to create an instance of an OverflowMap
or a SimpleOverflowMap
.
- Since:
- Coherence 12.1.2
- Author:
- pfm 2011.11.30
Methods inherited from class com.tangosol.coherence.config.scheme.AbstractServiceScheme |
getScopedServiceName, getScopedServiceName, getScopeName, getServiceBuilder, getServiceDependencies, getServiceName, getXml, injectScopeNameIntoService, isAutoStart, realizeService, setAutoStart, setScopeName, setServiceDependencies, setServiceName, setXml |
OverflowScheme
public OverflowScheme()
realizeMap
public java.util.Map realizeMap(com.tangosol.config.expression.ParameterResolver resolver,
MapBuilder.Dependencies dependencies)
- Realize a
Map
based on the state of the MapBuilder
, resolvable parameters and provided MapBuilder.Dependencies
.
-
- Specified by:
realizeMap
in interface MapBuilder
- Overrides:
realizeMap
in class AbstractCachingScheme
-
- Parameters:
resolver
- the ParameterResolver
dependencies
- the MapBuilder.Dependencies
for realizing the Map
- Returns:
- a
Map
establishMapListeners
public void establishMapListeners(java.util.Map map,
com.tangosol.config.expression.ParameterResolver resolver,
MapBuilder.Dependencies dependencies)
- Establishes an appropriate
MapListener
(provided by the ObservableCachingScheme.getListenerBuilder()
) on the ObservableMap
that was produced by the ObservableCachingScheme
.
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 the ConfigurableCacheFactory
.
-
- Specified by:
establishMapListeners
in interface ObservableCachingScheme
- Overrides:
establishMapListeners
in class AbstractCachingScheme
-
- Parameters:
map
- an ObservableMap
to which to add a MapListener
(if the map is not observable, no listeners are added)
resolver
- the ParameterResolver
to use for resolving builder parameters
dependencies
- the MapBuilder
dependencies from which to obtain builder information
- See Also:
Injectable
getExpiryDelay
public Seconds getExpiryDelay(com.tangosol.config.expression.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(com.tangosol.config.expression.Expression expr)
- Set the expiry delay.
-
- Parameters:
expr
- the expiry delay expression
isExpiryEnabled
public boolean isExpiryEnabled(com.tangosol.config.expression.ParameterResolver resolver)
- Return the expiry enabled flag.
-
- Parameters:
resolver
- the ParameterResolver
- Returns:
- true if expiry delay is enabled
setExpiryEnabled
@Injectable
public void setExpiryEnabled(com.tangosol.config.expression.Expression 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(value="miss-cache-scheme")
public void setMissCacheScheme(LocalScheme scheme)
- Set the miss cache scheme.
-
- Parameters:
scheme
- the miss cache scheme
Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.