Class PagedExternalScheme
- 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<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
ThePagedExternalSchemeclass 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
Constructors Constructor Description PagedExternalScheme()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BinaryStoreManagerBuildergetBinaryStoreManagerBuilder()Obtains theBinaryStoreManagerBuilderfor theBinaryStoreManager.SecondsgetPageDurationSeconds(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.MaprealizeMap(ParameterResolver resolver, MapBuilder.Dependencies dependencies)Realize aMapbased on the state of theMapBuilder, resolvable parameters and providedMapBuilder.Dependencies.voidsetBinaryStoreManagerBuilder(BinaryStoreManagerBuilder bldr)Sets theBinaryStoreManagerBuilderfor theBinaryStoreManager.voidsetPageDurationSeconds(Expression<Seconds> expr)Set 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, 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
-
-
-
-
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
-
getBinaryStoreManagerBuilder
public BinaryStoreManagerBuilder getBinaryStoreManagerBuilder()
Obtains theBinaryStoreManagerBuilderfor theBinaryStoreManager.- Specified by:
getBinaryStoreManagerBuilderin interfaceBinaryStoreManagerBuilderCustomization- Returns:
- the
BinaryStoreManagerBuilder
-
setBinaryStoreManagerBuilder
public void setBinaryStoreManagerBuilder(BinaryStoreManagerBuilder bldr)
Sets theBinaryStoreManagerBuilderfor theBinaryStoreManager.- Specified by:
setBinaryStoreManagerBuilderin interfaceBinaryStoreManagerBuilderCustomization- Parameters:
bldr- theBinaryStoreManagerBuilder
-
getPageDurationSeconds
public Seconds getPageDurationSeconds(ParameterResolver resolver)
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
@Injectable("page-duration") public void setPageDurationSeconds(Expression<Seconds> expr)
Set the page duration.- Parameters:
expr- the page duration expression
-
getPageLimit
public int getPageLimit(ParameterResolver resolver)
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
@Injectable public void setPageLimit(Expression<Integer> expr)
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
protected void validate(ParameterResolver resolver)
Validate the properties.- Overrides:
validatein classAbstractCachingScheme- Parameters:
resolver- the ParameterResolver needed to resolve expressions
-
-