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
The
EvictionPolicyBuilder
builds a ConfigurableCacheMap.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
-
Method Summary
Modifier and TypeMethodDescriptiongetEvictionType
(ParameterResolver resolver) Obtains the EvictionPolicy type.realize
(ParameterResolver resolver, ClassLoader loader, ParameterList listParameters) Realizes (creates if necessary) an instance of a object of type T, using the providedParameterResolver
to resolve values any referencedParameter
s.boolean
realizes
(Class<?> clzClass, ParameterResolver resolver, ClassLoader loader) Determines if theParameterizedBuilder
will realize an instance of the specified class (without requiring the builder to actually realize an object).void
setEvictionType
(Expression<String> expr) Set the EvictionPolicy type.Methods inherited from class com.tangosol.coherence.config.builder.DefaultBuilderCustomization
getCustomBuilder, setCustomBuilder
-
Constructor Details
-
EvictionPolicyBuilder
public EvictionPolicyBuilder()
-
-
Method Details
-
getEvictionType
Obtains the EvictionPolicy type.- Parameters:
resolver
- theParameterResolver
- Returns:
- the type of EvictionPolicy
-
setEvictionType
Set the EvictionPolicy type.- Parameters:
expr
- the EvictionPolicy type
-
realizes
Determines if theParameterizedBuilder
will realize an instance of the specified class (without requiring the builder to actually realize an object).This method is synonymous with the Java keyword
instanceof
but allows dynamic runtime type querying of the types of objects a builder may realize.- Specified by:
realizes
in interfaceParameterizedBuilder.ReflectionSupport
- Parameters:
clzClass
- the expected typeresolver
- theParameterResolver
to use for resolving necessaryParameter
sloader
- theClassLoader
for loading any necessary classes and ifnull
theClassLoader
used to load the builder will be used instead- Returns:
true
if theParameterizedBuilder
will realize an instance of the class,false
otherwise
-
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 providedParameterResolver
to resolve values any referencedParameter
s.- Specified by:
realize
in interfaceParameterizedBuilder<ConfigurableCacheMap.EvictionPolicy>
- Parameters:
resolver
- theParameterResolver
for resolving namedParameter
sloader
- theClassLoader
for loading any necessary classes and ifnull
theClassLoader
used 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
-