Class PagedExternalScheme
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<Map>
com.tangosol.coherence.config.scheme.PagedExternalScheme
- All Implemented Interfaces:
BackingMapManagerBuilder
,BuilderCustomization<Map>
,MapBuilder
,NamedCacheBuilder
,ServiceBuilder
,BinaryStoreManagerBuilderCustomization
,CachingScheme
,ObservableCachingScheme
,Scheme
,ServiceScheme
public class PagedExternalScheme
extends AbstractLocalCachingScheme<Map>
implements BinaryStoreManagerBuilderCustomization
The
PagedExternalScheme
class is responsible for building a
fully configured instance of a PagedExternalCache.- 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
-
Method Summary
Modifier and TypeMethodDescriptionObtains theBinaryStoreManagerBuilder
for theBinaryStoreManager
.getPageDurationSeconds
(ParameterResolver resolver) Return the length of time that a page in the cache is current.int
getPageLimit
(ParameterResolver resolver) Return the maximum number of pages that the cache manages before older pages are destroyed.protected SerializationPagedCache
instantiateSerializationPagedCache
(BinaryStoreManager storeMgr, int cPages, int cPageSecs, boolean fBinaryMap, boolean fPassive) Construct an SerializationPagedCache using the specified parameters.protected SerializationPagedCache
instantiateSerializationPagedCache
(BinaryStoreManager storeMgr, int cPages, int cPageSecs, ClassLoader loader) Construct an SerializationPagedCache using the specified parameters.realizeMap
(ParameterResolver resolver, MapBuilder.Dependencies dependencies) Realize aMap
based on the state of theMapBuilder
, resolvable parameters and providedMapBuilder.Dependencies
.void
Sets theBinaryStoreManagerBuilder
for theBinaryStoreManager
.void
Set the page duration.void
setPageLimit
(Expression<Integer> expr) Set the page limit.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
-
Constructor Details
-
PagedExternalScheme
public PagedExternalScheme()
-
-
Method Details
-
realizeMap
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
-
getBinaryStoreManagerBuilder
Obtains theBinaryStoreManagerBuilder
for theBinaryStoreManager
.- Specified by:
getBinaryStoreManagerBuilder
in interfaceBinaryStoreManagerBuilderCustomization
- Returns:
- the
BinaryStoreManagerBuilder
-
setBinaryStoreManagerBuilder
Sets theBinaryStoreManagerBuilder
for theBinaryStoreManager
.- Specified by:
setBinaryStoreManagerBuilder
in interfaceBinaryStoreManagerBuilderCustomization
- Parameters:
bldr
- theBinaryStoreManagerBuilder
-
getPageDurationSeconds
Return the length of time that a page in the cache is current. After the duration is exceeded, the page is closed and a new current page is created. Legal values are zero or values between 5 and 604800 seconds (one week).- Parameters:
resolver
- the ParameterResolver- Returns:
- the page duration
-
setPageDurationSeconds
Set the page duration.- Parameters:
expr
- the page duration expression
-
getPageLimit
Return the maximum number of pages that the cache manages before older pages are destroyed. Legal values are zero or positive integers between 2 and 3600.- Parameters:
resolver
- the ParameterResolver- Returns:
- the page limit
-
setPageLimit
Set the page limit.- Parameters:
expr
- the page limit expression
-
instantiateSerializationPagedCache
protected SerializationPagedCache instantiateSerializationPagedCache(BinaryStoreManager storeMgr, int cPages, int cPageSecs, ClassLoader loader) Construct an SerializationPagedCache using the specified parameters.This method exposes a corresponding SerializationPagedCache
constructor
and is provided for the express purpose of allowing its override.- Parameters:
storeMgr
- the BinaryStoreManager that provides BinaryStore objects that the serialized objects are written tocPages
- the maximum number of pages to have active at a timecPageSecs
- the length of time, in seconds, that a 'page' is currentloader
- the ClassLoader to use for deserialization- Returns:
- the instantiated
SerializationPagedCache
-
instantiateSerializationPagedCache
protected SerializationPagedCache instantiateSerializationPagedCache(BinaryStoreManager storeMgr, int cPages, int cPageSecs, boolean fBinaryMap, boolean fPassive) Construct an SerializationPagedCache using the specified parameters.This method exposes a corresponding SerializationPagedCache
constructor
and is provided for the express purpose of allowing its override.- Parameters:
storeMgr
- the BinaryStoreManager that provides BinaryStore objects that the serialized objects are written tocPages
- the maximum number of pages to have active at a timecPageSecs
- the length of time, in seconds, that a 'page' is currentfBinaryMap
- true indicates that this map will only manage binary keys and valuesfPassive
- true indicates that this map is a passive cache, which means that it is just a backup of the cache and does not actively expire data- Returns:
- the instantiated
SerializationPagedCache
-
validate
Validate the properties.- Overrides:
validate
in classAbstractCachingScheme
- Parameters:
resolver
- the ParameterResolver needed to resolve expressions
-