Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


com.tangosol.coherence.config.scheme
Class ExternalScheme

java.lang.Object
  extended by com.tangosol.coherence.config.scheme.AbstractScheme
      extended by com.tangosol.coherence.config.scheme.AbstractServiceScheme
          extended by com.tangosol.coherence.config.scheme.AbstractCachingScheme
              extended by com.tangosol.coherence.config.scheme.AbstractLocalCachingScheme
                  extended by com.tangosol.coherence.config.scheme.ExternalScheme

All Implemented Interfaces:
BackingMapManagerBuilder, BuilderCustomization, MapBuilder, NamedCacheBuilder, ServiceBuilder, BinaryStoreManagerBuilderCustomization, CachingScheme, ObservableCachingScheme, Scheme, ServiceScheme

public class ExternalScheme
extends AbstractLocalCachingScheme
implements BinaryStoreManagerBuilderCustomization

The 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

 

Constructor Summary
ExternalScheme()
           

 

Method Summary
 BinaryStoreManagerBuilder getBinaryStoreManagerBuilder()
          Obtains the BinaryStoreManagerBuilder for the BinaryStoreManager.
 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.
 Units getHighUnits(com.tangosol.config.expression.ParameterResolver resolver)
          Return the limit of cache size.
 UnitCalculatorBuilder getUnitCalculatorBuilder()
          Return the UnitCalculatorBuilder used to build a UnitCalculator.
 int getUnitFactor(com.tangosol.config.expression.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, java.lang.ClassLoader loader)
          Construct an SerializationCache using the specified parameters.
protected  SerializationMap instantiateSerializationMap(BinaryStore store, boolean fBinaryMap)
          Construct an SerializationMap using the specified parameters.
protected  SerializationMap instantiateSerializationMap(BinaryStore store, java.lang.ClassLoader loader)
          Construct an SerializationMap using the specified parameters.
protected  java.util.Map instantiateSerializationMap(com.tangosol.config.expression.ParameterResolver resolver, BinaryStore store, boolean fBinaryMap, java.lang.ClassLoader loader, int cHighUnits, int cExpiryMillis)
          Instantiate a SerializationMap, SerializationCache, SimpleSerializationMap, or any sub-class thereof.
protected  SimpleSerializationMap instantiateSimpleSerializationMap(BinaryStore store, boolean fBinaryMap)
          Construct a SimpleSerializationMap using the specified parameters.
protected  SimpleSerializationMap instantiateSimpleSerializationMap(BinaryStore store, java.lang.ClassLoader loader)
          Construct a SimpleSerializationMap using the specified parameters.
 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.
 void setBinaryStoreManagerBuilder(BinaryStoreManagerBuilder bldr)
          Sets the BinaryStoreManagerBuilder for the BinaryStoreManager.
 void setExpiryDelay(com.tangosol.config.expression.Expression expr)
          Set the expiry delay.
 void setHighUnits(com.tangosol.config.expression.Expression expr)
          Set the high units.
 void setUnitCalculatorBuilder(UnitCalculatorBuilder bldr)
          Set the UnitCalculatorBuilder.
 void setUnitFactor(com.tangosol.config.expression.Expression expr)
          Set the unit factor.
protected  void validate(com.tangosol.config.expression.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
getScopedServiceName, getScopedServiceName, getScopeName, getServiceBuilder, getServiceName, getXml, injectScopeNameIntoService, isAutoStart, realizeService, setAutoStart, setScopeName, setServiceName, setXml, validate

 

Methods inherited from class com.tangosol.coherence.config.scheme.AbstractScheme
getSchemeName, isAnonymous, setSchemeName

 

Methods inherited from interface com.tangosol.coherence.config.scheme.ServiceScheme
getScopedServiceName, getScopedServiceName, getServiceBuilder, getServiceName, isAutoStart

 

Methods inherited from interface com.tangosol.coherence.config.scheme.Scheme
getSchemeName, isAnonymous

 

Constructor Detail

ExternalScheme

public ExternalScheme()

Method Detail

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

getBinaryStoreManagerBuilder

public BinaryStoreManagerBuilder getBinaryStoreManagerBuilder()
Obtains the BinaryStoreManagerBuilder for the BinaryStoreManager.
Specified by:
getBinaryStoreManagerBuilder in interface BinaryStoreManagerBuilderCustomization
Returns:
the BinaryStoreManagerBuilder

setBinaryStoreManagerBuilder

public void setBinaryStoreManagerBuilder(BinaryStoreManagerBuilder bldr)
Sets the BinaryStoreManagerBuilder for the BinaryStoreManager.
Specified by:
setBinaryStoreManagerBuilder in interface BinaryStoreManagerBuilderCustomization
Parameters:
bldr - the BinaryStoreManagerBuilder

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

getHighUnits

public Units getHighUnits(com.tangosol.config.expression.ParameterResolver resolver)
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

@Injectable
public void setHighUnits(com.tangosol.config.expression.Expression expr)
Set the high units.
Parameters:
expr - the high units expression

getUnitCalculatorBuilder

public UnitCalculatorBuilder getUnitCalculatorBuilder()
Return the UnitCalculatorBuilder used to build a UnitCalculator.
Returns:
the unit calculator

setUnitCalculatorBuilder

@Injectable(value="unit-calculator")
public void setUnitCalculatorBuilder(UnitCalculatorBuilder bldr)
Set the UnitCalculatorBuilder.
Parameters:
bldr - the UnitCalculatorBuilder

getUnitFactor

public int getUnitFactor(com.tangosol.config.expression.ParameterResolver resolver)
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

@Injectable
public void setUnitFactor(com.tangosol.config.expression.Expression expr)
Set the unit factor.
Parameters:
expr - the unit factor expression

instantiateSerializationMap

protected java.util.Map instantiateSerializationMap(com.tangosol.config.expression.ParameterResolver resolver,
                                                    BinaryStore store,
                                                    boolean fBinaryMap,
                                                    java.lang.ClassLoader loader,
                                                    int cHighUnits,
                                                    int cExpiryMillis)
Instantiate a SerializationMap, SerializationCache, SimpleSerializationMap, or any sub-class thereof.
Parameters:
resolver - the ParmeterResolver
store - a BinaryStore to use to write serialized data to
fBinaryMap - true if the only data written to the Map will already be in Binary form
loader - the ClassLoader to use (if not a Binary map)
cHighUnits - the max size in units for the serialization cache
cExpiryMillis - 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,
                                                           java.lang.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.


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.


instantiateSerializationMap

protected SerializationMap instantiateSerializationMap(BinaryStore store,
                                                       java.lang.ClassLoader loader)
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.


instantiateSerializationMap

protected SerializationMap instantiateSerializationMap(BinaryStore store,
                                                       boolean fBinaryMap)
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.


instantiateSimpleSerializationMap

protected SimpleSerializationMap instantiateSimpleSerializationMap(BinaryStore store,
                                                                   java.lang.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.

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.

Since:
Coherence 3.7

validate

protected void validate(com.tangosol.config.expression.ParameterResolver resolver)
Validate the properties.
Overrides:
validate in class AbstractCachingScheme
Parameters:
resolver - the ParameterResolver needed to resolve expressions

Skip navigation links

Oracle® Coherence Java API Reference
Release 12.1.2.0.3

E26043-02


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.