Class ExternalScheme
- All Implemented Interfaces:
BackingMapManagerBuilder
,BuilderCustomization<Object>
,MapBuilder
,NamedCacheBuilder
,ServiceBuilder
,BinaryStoreManagerBuilderCustomization
,CachingScheme
,ObservableCachingScheme
,Scheme
,ServiceScheme
ExternalScheme
class is responsible for building
a fully configured instance of a ExternalCache.- 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
.getExpiryDelay
(ParameterResolver resolver) Return the amount of time since the last update that entries are kept by the cache before being expired.getHighUnits
(ParameterResolver resolver) Return the limit of cache size.Return the UnitCalculatorBuilder used to build a UnitCalculator.int
getUnitFactor
(ParameterResolver resolver) Return the unit-factor element specifies the factor by which the units, low-units and high-units properties are adjusted.protected SerializationCache
instantiateSerializationCache
(BinaryStore store, int cMax, boolean fBinaryMap) Construct an SerializationCache using the specified parameters.protected SerializationCache
instantiateSerializationCache
(BinaryStore store, int cMax, ClassLoader loader) Construct an SerializationCache using the specified parameters.protected Map
instantiateSerializationMap
(ParameterResolver resolver, BinaryStore store, boolean fBinaryMap, ClassLoader loader, int cHighUnits, int cExpiryMillis) Instantiate a SerializationMap, SerializationCache, SimpleSerializationMap, or any sub-class thereof.protected SerializationMap
instantiateSerializationMap
(BinaryStore store, boolean fBinaryMap) Construct an SerializationMap using the specified parameters.protected SerializationMap
instantiateSerializationMap
(BinaryStore store, ClassLoader loader) Construct an SerializationMap using the specified parameters.protected SimpleSerializationMap
instantiateSimpleSerializationMap
(BinaryStore store, boolean fBinaryMap) Construct a SimpleSerializationMap using the specified parameters.protected SimpleSerializationMap
instantiateSimpleSerializationMap
(BinaryStore store, ClassLoader loader) Construct a SimpleSerializationMap 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
setExpiryDelay
(Expression<Seconds> expr) Set the expiry delay.void
setHighUnits
(Expression<Units> expr) Set the high units.void
Set the UnitCalculatorBuilder.void
setUnitFactor
(Expression<Integer> expr) Set the unit factor.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
-
ExternalScheme
public ExternalScheme()
-
-
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
-
getExpiryDelay
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
Set the expiry delay.- Parameters:
expr
- the expiry delay expression
-
getHighUnits
Return the limit of cache size. Contains the maximum number of units that can be placed n the cache before pruning occurs. An entry is the unit of measurement, unless it is overridden by an alternate unit-calculator. When this limit is exceeded, the cache begins the pruning process, evicting entries according to the eviction policy. Legal values are positive integers or zero. Zero implies no limit.- Parameters:
resolver
- the ParameterResolver- Returns:
- the high units
-
setHighUnits
Set the high units.- Parameters:
expr
- the high units expression
-
getUnitCalculatorBuilder
Return the UnitCalculatorBuilder used to build a UnitCalculator.- Returns:
- the unit calculator
-
setUnitCalculatorBuilder
Set the UnitCalculatorBuilder.- Parameters:
bldr
- the UnitCalculatorBuilder
-
getUnitFactor
Return the unit-factor element specifies the factor by which the units, low-units and high-units properties are adjusted. Using a BINARY unit calculator, for example, the factor of 1048576 could be used to count megabytes instead of bytes.- Parameters:
resolver
- the ParameterResolver- Returns:
- the unit factor
-
setUnitFactor
Set the unit factor.- Parameters:
expr
- the unit factor expression
-
instantiateSerializationMap
protected Map instantiateSerializationMap(ParameterResolver resolver, BinaryStore store, boolean fBinaryMap, ClassLoader loader, int cHighUnits, int cExpiryMillis) Instantiate a SerializationMap, SerializationCache, SimpleSerializationMap, or any sub-class thereof.- Parameters:
resolver
- the ParmeterResolverstore
- a BinaryStore to use to write serialized data tofBinaryMap
- true if the only data written to the Map will already be in Binary formloader
- the ClassLoader to use (if not a Binary map)cHighUnits
- the max size in units for the serialization cachecExpiryMillis
- the expiry time in milliseconds for the cache- Returns:
- a BinaryMap, SerializationMap, SerializationCache, SimpleSerializationMap, or a subclass thereof
-
instantiateSerializationCache
protected SerializationCache instantiateSerializationCache(BinaryStore store, int cMax, ClassLoader loader) Construct an SerializationCache using the specified parameters.This method exposes a corresponding SerializationCache
constructor
and is provided for the express purpose of allowing its override.- Parameters:
store
- the BinaryStore to use to write the serialized objects tocMax
- the maximum number of items to store in the binary storeloader
- the ClassLoader to use for deserialization- Returns:
- the instantiated
SerializationCache
-
instantiateSerializationCache
protected SerializationCache instantiateSerializationCache(BinaryStore store, int cMax, boolean fBinaryMap) Construct an SerializationCache using the specified parameters.This method exposes a corresponding SerializationCache
constructor
and is provided for the express purpose of allowing its override.- Parameters:
store
- the BinaryStore to use to write the serialized objects tocMax
- the maximum number of items to store in the binary storefBinaryMap
- true indicates that this map will only manage binary keys and values- Returns:
- the instantiated
SerializationCache
-
instantiateSerializationMap
Construct an SerializationMap using the specified parameters.This method exposes a corresponding SerializationMap
constructor
and is provided for the express purpose of allowing its override.- Parameters:
store
- the BinaryStore to use to write the serialized objects toloader
- the ClassLoader to use for deserialization- Returns:
- the instantiated
SerializationMap
-
instantiateSerializationMap
Construct an SerializationMap using the specified parameters.This method exposes a corresponding SerializationMap
constructor
and is provided for the express purpose of allowing its override.- Parameters:
store
- the BinaryStore to use to write the serialized objects tofBinaryMap
- true indicates that this map will only manage binary keys and values- Returns:
- the instantiated
SerializationMap
-
instantiateSimpleSerializationMap
protected SimpleSerializationMap instantiateSimpleSerializationMap(BinaryStore store, ClassLoader loader) Construct a SimpleSerializationMap using the specified parameters.This method exposes a corresponding SerializationMap
constructor
and is provided for the express purpose of allowing its override.- Parameters:
store
- the BinaryStore to use to write the serialized objects toloader
- the ClassLoader to use for deserialization- Returns:
- the instantiated
SimpleSerializationMap
- Since:
- Coherence 3.7
-
instantiateSimpleSerializationMap
protected SimpleSerializationMap instantiateSimpleSerializationMap(BinaryStore store, boolean fBinaryMap) Construct a SimpleSerializationMap using the specified parameters.This method exposes a corresponding SerializationMap
constructor
and is provided for the express purpose of allowing its override.- Parameters:
store
- the BinaryStore to use to write the serialized objects tofBinaryMap
- true indicates that this map will only manage binary keys and values- Returns:
- the instantiated
SimpleSerializationMap
- Since:
- Coherence 3.7
-
validate
Validate the properties.- Overrides:
validate
in classAbstractCachingScheme
- Parameters:
resolver
- the ParameterResolver needed to resolve expressions
-