Class EvictionPolicyBuilder
- java.lang.Object
-
- com.tangosol.coherence.config.builder.DefaultBuilderCustomization<ConfigurableCacheMap.EvictionPolicy>
-
- com.tangosol.coherence.config.builder.EvictionPolicyBuilder
-
- All Implemented Interfaces:
BuilderCustomization<ConfigurableCacheMap.EvictionPolicy>,ParameterizedBuilder<ConfigurableCacheMap.EvictionPolicy>,ParameterizedBuilder.ReflectionSupport
public class EvictionPolicyBuilder extends DefaultBuilderCustomization<ConfigurableCacheMap.EvictionPolicy> implements ParameterizedBuilder<ConfigurableCacheMap.EvictionPolicy>, ParameterizedBuilder.ReflectionSupport
TheEvictionPolicyBuilderbuilds aConfigurableCacheMap.EvictionPolicy.- Since:
- Coherence 12.1.2
- Author:
- pfm 2012.01.07
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.tangosol.coherence.config.builder.ParameterizedBuilder
ParameterizedBuilder.ReflectionSupport
-
-
Constructor Summary
Constructors Constructor Description EvictionPolicyBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetEvictionType(ParameterResolver resolver)Obtains the EvictionPolicy type.ConfigurableCacheMap.EvictionPolicyrealize(ParameterResolver resolver, ClassLoader loader, ParameterList listParameters)Realizes (creates if necessary) an instance of a object of type T, using the providedParameterResolverto resolve values any referencedParameters.booleanrealizes(Class<?> clzClass, ParameterResolver resolver, ClassLoader loader)Determines if theParameterizedBuilderwill realize an instance of the specified class (without requiring the builder to actually realize an object).voidsetEvictionType(Expression<String> expr)Set the EvictionPolicy type.-
Methods inherited from class com.tangosol.coherence.config.builder.DefaultBuilderCustomization
getCustomBuilder, setCustomBuilder
-
-
-
-
Method Detail
-
getEvictionType
public String getEvictionType(ParameterResolver resolver)
Obtains the EvictionPolicy type.- Parameters:
resolver- theParameterResolver- Returns:
- the type of EvictionPolicy
-
setEvictionType
@Injectable public void setEvictionType(Expression<String> expr)
Set the EvictionPolicy type.- Parameters:
expr- the EvictionPolicy type
-
realizes
public boolean realizes(Class<?> clzClass, ParameterResolver resolver, ClassLoader loader)
Determines if theParameterizedBuilderwill realize an instance of the specified class (without requiring the builder to actually realize an object).This method is synonymous with the Java keyword
instanceofbut allows dynamic runtime type querying of the types of objects a builder may realize.- Specified by:
realizesin interfaceParameterizedBuilder.ReflectionSupport- Parameters:
clzClass- the expected typeresolver- theParameterResolverto use for resolving necessaryParametersloader- theClassLoaderfor loading any necessary classes and ifnulltheClassLoaderused to load the builder will be used instead- Returns:
trueif theParameterizedBuilderwill realize an instance of the class,falseotherwise
-
realize
public ConfigurableCacheMap.EvictionPolicy realize(ParameterResolver resolver, ClassLoader loader, ParameterList listParameters)
Realizes (creates if necessary) an instance of a object of type T, using the providedParameterResolverto resolve values any referencedParameters.- Specified by:
realizein interfaceParameterizedBuilder<ConfigurableCacheMap.EvictionPolicy>- Parameters:
resolver- theParameterResolverfor resolving namedParametersloader- theClassLoaderfor loading any necessary classes and ifnulltheClassLoaderused to load the builder will be used insteadlistParameters- an optionalParameterList(may benull) to be used for realizing the instance, eg: used as constructor parameters- Returns:
- an instance of T
-
-