Class RegionConfig
java.lang.Object
org.apache.geode.cache.configuration.RegionConfig
- All Implemented Interfaces:
Serializable,org.apache.geode.lang.Identifiable<String>
@Experimental
public class RegionConfig
extends Object
implements org.apache.geode.lang.Identifiable<String>, Serializable
A "region" element describes a region (and its entries) in Geode distributed cache.
It may be used to create a new region or may be used to add new entries to an existing
region. Note that the "name" attribute specifies the simple name of the region; it
cannot contain a "/". If "refid" is set then it defines the default region attributes
to use for this region. A nested "region-attributes" element can override these defaults.
If the nested "region-attributes" element has its own "refid" then it will cause the
"refid" on the region to be ignored. "refid" can be set to the name of a RegionShortcut
or a ClientRegionShortcut (see the javadocs of those enum classes for their names).
Java class for region-type complex type.
The following schema fragment specifies the expected content contained within this class.
<complexType name="region-type">
<complexContent>
<restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
<sequence>
<element name="region-attributes" type="{http://geode.apache.org/schema/cache}region-attributes-type" maxOccurs="unbounded" minOccurs="0"/>
<element name="index" maxOccurs="unbounded" minOccurs="0">
<complexType>
<complexContent>
<restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
<choice minOccurs="0">
<element name="functional">
<complexType>
<complexContent>
<restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
<attribute name="expression" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
<attribute name="from-clause" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
<attribute name="imports" type="{http://www.w3.org/2001/XMLSchema}string" />
</restriction>
</complexContent>
</complexType>
</element>
<element name="primary-key">
<complexType>
<complexContent>
<restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
<attribute name="field" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
</restriction>
</complexContent>
</complexType>
</element>
</choice>
<attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
<attribute name="expression" type="{http://www.w3.org/2001/XMLSchema}string" />
<attribute name="from-clause" type="{http://www.w3.org/2001/XMLSchema}string" />
<attribute name="imports" type="{http://www.w3.org/2001/XMLSchema}string" />
<attribute name="key-index" type="{http://www.w3.org/2001/XMLSchema}boolean" />
<attribute name="type" default="range">
<simpleType>
<restriction base="{http://www.w3.org/2001/XMLSchema}string">
<enumeration value="range"/>
<enumeration value="hash"/>
</restriction>
</simpleType>
</attribute>
</restriction>
</complexContent>
</complexType>
</element>
<element name="entry" maxOccurs="unbounded" minOccurs="0">
<complexType>
<complexContent>
<restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
<sequence>
<element name="key">
<complexType>
<complexContent>
<restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
<choice>
<element name="string" type="{http://geode.apache.org/schema/cache}string-type"/>
<element name="declarable" type="{http://geode.apache.org/schema/cache}declarable-type"/>
</choice>
</restriction>
</complexContent>
</complexType>
</element>
<element name="value">
<complexType>
<complexContent>
<restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
<choice>
<element name="string" type="{http://geode.apache.org/schema/cache}string-type"/>
<element name="declarable" type="{http://geode.apache.org/schema/cache}declarable-type"/>
</choice>
</restriction>
</complexContent>
</complexType>
</element>
</sequence>
</restriction>
</complexContent>
</complexType>
</element>
<any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
<element name="region" type="{http://geode.apache.org/schema/cache}region-type" maxOccurs="unbounded" minOccurs="0"/>
</sequence>
<attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
<attribute name="refid" type="{http://www.w3.org/2001/XMLSchema}string" />
</restriction>
</complexContent>
</complexType>
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classJava class for anonymous complex type.static classJava class for anonymous complex type. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<RegionConfig.Entry>protected List<RegionConfig.Index>protected Stringprotected RegionAttributesTypeprotected List<CacheElement>protected List<RegionConfig>protected String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the list of custom region elements Currently, users can not create regions with custom region elements using management v2 api.Gets the value of the entry property.getId()Gets the value of the index property.getName()Gets the value of the name property.Gets the list of the sub regions Currently, users can not create regions with sub regions using management v2 api.getType()Gets the value of the type property.voidSets the value of the name property.voidsetRegionAttributes(RegionAttributesType regionAttributes) voidvoidsetType(org.apache.geode.management.configuration.RegionType regionType) Sets the value of the type property.
-
Field Details
-
regionAttributes
-
indexes
-
entries
-
regionElements
-
regions
-
name
-
type
-
-
Constructor Details
-
RegionConfig
public RegionConfig() -
RegionConfig
-
-
Method Details
-
getRegionAttributes
-
setRegionAttributes
-
getIndexes
Gets the value of the index property.This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a
setmethod for the index property.For example, to add a new item, do as follows:
getIndexes().add(newItem);
Objects of the following type(s) are allowed in the list
RegionConfig.Index- Returns:
- the value of the index property
-
getEntries
Gets the value of the entry property. Currently, users can not create regions with initial entries using management v2 api. this entry list will be ignored when creating the region- Returns:
- the value of the entry property
-
getCustomRegionElements
Gets the list of custom region elements Currently, users can not create regions with custom region elements using management v2 api. this cache element list will be ignored when creating the region- Returns:
- the list of custom region elements
-
getRegions
Gets the list of the sub regions Currently, users can not create regions with sub regions using management v2 api. This sub region list will be ignored when creating the region.- Returns:
- the list of the sub regions
-
getName
Gets the value of the name property. possible object isString- Returns:
- the value of the name property
-
setName
Sets the value of the name property. allowed object isString- Parameters:
value- the value of the name property- Throws:
IllegalArgumentException
-
getType
Gets the value of the type property. possible object isString- Returns:
- the value of the type property
-
setType
public void setType(org.apache.geode.management.configuration.RegionType regionType) Sets the value of the type property. allowed object isString- Parameters:
regionType- the value of the type property
-
setType
-
getId
- Specified by:
getIdin interfaceorg.apache.geode.lang.Identifiable<String>
-