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_serviceDependenciesFields inherited from interface com.tangosol.coherence.config.scheme.ServiceScheme
DELIM_APPLICATION_SCOPE, DELIM_DOMAIN_PARTITION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionObtains theBinaryStoreManagerBuilderfor theBinaryStoreManager.getPageDurationSeconds(ParameterResolver resolver) Return the length of time that a page in the cache is current.intgetPageLimit(ParameterResolver resolver) Return the maximum number of pages that the cache manages before older pages are destroyed.protected SerializationPagedCacheinstantiateSerializationPagedCache(BinaryStoreManager storeMgr, int cPages, int cPageSecs, boolean fBinaryMap, boolean fPassive) Construct an SerializationPagedCache using the specified parameters.protected SerializationPagedCacheinstantiateSerializationPagedCache(BinaryStoreManager storeMgr, int cPages, int cPageSecs, ClassLoader loader) Construct an SerializationPagedCache using the specified parameters.realizeMap(ParameterResolver resolver, MapBuilder.Dependencies dependencies) Realize aMapbased on the state of theMapBuilder, resolvable parameters and providedMapBuilder.Dependencies.voidSets theBinaryStoreManagerBuilderfor theBinaryStoreManager.voidSet the page duration.voidsetPageLimit(Expression<Integer> expr) Set the page limit.protected voidvalidate(ParameterResolver resolver) Validate the properties.Methods inherited from class com.tangosol.coherence.config.scheme.AbstractLocalCachingScheme
getCustomBuilder, getEventInterceptorBuilders, getServiceType, isRunningClusterNeeded, setCustomBuilderMethods inherited from class com.tangosol.coherence.config.scheme.AbstractCachingScheme
establishMapListeners, 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
getNamedCollectionBuilder, getScopedServiceName, getScopedServiceNameForProperty, getServiceBuilder, getServiceName, isAutoStart
-
Constructor Details
-
PagedExternalScheme
public PagedExternalScheme()
-
-
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
-
getBinaryStoreManagerBuilder
Obtains theBinaryStoreManagerBuilderfor theBinaryStoreManager.- Specified by:
getBinaryStoreManagerBuilderin interfaceBinaryStoreManagerBuilderCustomization- Returns:
- the
BinaryStoreManagerBuilder
-
setBinaryStoreManagerBuilder
Sets theBinaryStoreManagerBuilderfor theBinaryStoreManager.- Specified by:
setBinaryStoreManagerBuilderin 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
constructorand 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
constructorand 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:
validatein classAbstractCachingScheme- Parameters:
resolver- the ParameterResolver needed to resolve expressions
-