protected static class EvictionConfiguration.EvictionPolicyMetaData extends Object implements EvictionConfiguration.EvictionPolicyConfigurer
Modifier and Type | Field and Description |
---|---|
protected static String[] |
ALL_REGIONS |
Modifier | Constructor and Description |
---|---|
protected |
EvictionPolicyMetaData(org.apache.geode.cache.EvictionAttributes evictionAttributes)
Constructs an instance of
EvictionConfiguration.EvictionPolicyMetaData initialized with the given
EvictionAttributes applying to all Regions . |
protected |
EvictionPolicyMetaData(org.apache.geode.cache.EvictionAttributes evictionAttributes,
String[] regionNames)
Constructs an instance of
EvictionConfiguration.EvictionPolicyMetaData initialized with the given
EvictionAttributes to apply to the specific Regions . |
Modifier and Type | Method and Description |
---|---|
protected boolean |
accepts(Object regionFactoryBean)
Determines whether the given
Object (e.g. |
protected boolean |
accepts(Supplier<String> regionName)
Determine whether the
Region identified by name is accepted for Eviction policy configuration. |
Object |
configure(Object regionFactoryBean)
Configure the Eviction policy on the given SDG
PeerRegionFactoryBean or ClientRegionFactoryBean
used to create a GemFire Region . |
protected static EvictionConfiguration.EvictionPolicyMetaData |
from(AnnotationAttributes evictionPolicyAttributes,
ApplicationContext applicationContext) |
protected static EvictionConfiguration.EvictionPolicyMetaData |
from(EnableEviction.EvictionPolicy evictionPolicy,
ApplicationContext applicationContext) |
protected static EvictionConfiguration.EvictionPolicyMetaData |
from(EvictionPolicyType type,
int maximum,
EvictionActionType action,
org.apache.geode.cache.util.ObjectSizer objectSizer,
String... regionNames) |
protected static EvictionConfiguration.EvictionPolicyMetaData |
fromDefaults() |
protected org.apache.geode.cache.EvictionAttributes |
getEvictionAttributes()
Returns an instance of the
EvictionAttributes specifying the Eviction policy configuration
captured in this Eviction policy meta-data. |
protected static org.apache.geode.cache.util.ObjectSizer |
resolveObjectSizer(String objectSizerName,
ApplicationContext applicationContext) |
protected String |
resolveRegionName(Object regionFactoryBean)
Resolves the name of a given
Region from the corresponding ResolvableRegionFactoryBean object. |
protected static Integer |
resolveThreshold(int maximum,
EvictionPolicyType type)
Resolves the Eviction policy threshold (a.k.a. maximum) based on the
EvictionPolicyType . |
protected EvictingRegionFactoryBean |
setEvictionAttributes(EvictingRegionFactoryBean regionFactoryBean)
Sets the
EvictionAttributes on the PeerRegionFactoryBean or ClientRegionFactoryBean
used to create the targeted Region . |
protected static final String[] ALL_REGIONS
protected EvictionPolicyMetaData(org.apache.geode.cache.EvictionAttributes evictionAttributes)
EvictionConfiguration.EvictionPolicyMetaData
initialized with the given
EvictionAttributes
applying to all Regions
.evictionAttributes
- EvictionAttributes
specifying the Eviction policy configuration
for a Region
.EvictionAttributes
,
EvictionPolicyMetaData(EvictionAttributes, String[])
protected EvictionPolicyMetaData(org.apache.geode.cache.EvictionAttributes evictionAttributes, String[] regionNames)
EvictionConfiguration.EvictionPolicyMetaData
initialized with the given
EvictionAttributes
to apply to the specific Regions
.evictionAttributes
- EvictionAttributes
specifying the Eviction policy configuration
for a Region
.regionNames
- names of Regions
on which the Eviction policy is applied.EvictionAttributes
protected static EvictionConfiguration.EvictionPolicyMetaData from(@NonNull AnnotationAttributes evictionPolicyAttributes, @NonNull ApplicationContext applicationContext)
protected static EvictionConfiguration.EvictionPolicyMetaData from(EnableEviction.EvictionPolicy evictionPolicy, ApplicationContext applicationContext)
protected static EvictionConfiguration.EvictionPolicyMetaData from(EvictionPolicyType type, int maximum, EvictionActionType action, org.apache.geode.cache.util.ObjectSizer objectSizer, String... regionNames)
protected static EvictionConfiguration.EvictionPolicyMetaData fromDefaults()
protected static org.apache.geode.cache.util.ObjectSizer resolveObjectSizer(String objectSizerName, ApplicationContext applicationContext)
protected static Integer resolveThreshold(int maximum, EvictionPolicyType type)
EvictionPolicyType
.
For instance EvictionPolicyType.HEAP_PERCENTAGE
does not support maximum/threshold since
the settings are determined by the Pivotal GemFire/Apache Geode cache critical heap percentage and eviction heap percentage
System property settings.maximum
- integer value specifying the configured Eviction threshold.type
- EvictionPolicyType
specifying the type of Eviction algorithm.EvictionPolicyType
protected org.apache.geode.cache.EvictionAttributes getEvictionAttributes()
EvictionAttributes
specifying the Eviction policy configuration
captured in this Eviction policy meta-data.EvictionAttributes
specifying the Region
Eviction policy configuration.IllegalStateException
- if the EvictionAttributes
were not properly initialized.EvictionAttributes
protected boolean accepts(Object regionFactoryBean)
Object
(e.g. Spring bean) is accepted for Eviction policy configuration.regionFactoryBean
- Object
being evaluated as an Eviction policy configuration candidate.Object
is accepted for Eviction policy configuration.EvictionConfiguration.isRegionFactoryBean(Object)
,
resolveRegionName(Object)
,
accepts(Supplier)
protected boolean accepts(Supplier<String> regionName)
Region
identified by name is accepted for Eviction policy configuration.regionName
- name of the Region
targeted for Eviction policy configuration.Region
is accepted for Eviction policy configuration.protected String resolveRegionName(Object regionFactoryBean)
Region
from the corresponding ResolvableRegionFactoryBean
object.regionFactoryBean
- ResolvableRegionFactoryBean
from which to resolve the Region
name.Region
created from the given ResolvableRegionFactoryBean
.ResolvableRegionFactoryBean.resolveRegionName()
protected EvictingRegionFactoryBean setEvictionAttributes(EvictingRegionFactoryBean regionFactoryBean)
EvictionAttributes
on the PeerRegionFactoryBean
or ClientRegionFactoryBean
used to create the targeted Region
.regionFactoryBean
- PeerRegionFactoryBean
or ClientRegionFactoryBean
on which to
set the EvictionAttributes
encapsulating the Eviction policy for the targeted Region
.regionFactoryBean
.EvictingRegionFactoryBean.setEvictionAttributes(EvictionAttributes)
,
EvictionAttributes
,
getEvictionAttributes()
public Object configure(Object regionFactoryBean)
EvictionConfiguration.EvictionPolicyConfigurer
PeerRegionFactoryBean
or ClientRegionFactoryBean
used to create a GemFire Region
.configure
in interface EvictionConfiguration.EvictionPolicyConfigurer
regionFactoryBean
- PeerRegionFactoryBean
or ClientRegionFactoryBean
used to create
a GemFire Region
.regionFactoryBean
.PeerRegionFactoryBean
,
ClientRegionFactoryBean
Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.