deploymentPolicy.xsd file

Use the deployment policy XML schema to create a deployment descriptor XML file.

See the Deployment policy descriptor XML file for descriptions of the elements and attributes defined in the deploymentPolicy.xsd file.

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:dp="http://ibm.com/ws/objectgrid/deploymentPolicy"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://ibm.com/ws/objectgrid/deploymentPolicy"
    elementFormDefault="qualified">

    <xsd:element name="deploymentPolicy">
        <xsd:complexType>
            <xsd:choice>
                <xsd:element name="objectgridDeployment"
                    type="dp:objectgridDeployment" minOccurs="1"
                    maxOccurs="unbounded">
                    <xsd:unique name="mapSetNameUnique">
                        <xsd:selector xpath="dp:mapSet" />
                        <xsd:field xpath="@name" />
                    </xsd:unique>
                </xsd:element>
            </xsd:choice>
        </xsd:complexType>
    </xsd:element>

    <xsd:complexType name="objectgridDeployment">
        <xsd:sequence>
            <xsd:element name="mapSet" type="dp:mapSet"
                maxOccurs="unbounded" minOccurs="1">
                <xsd:unique name="mapNameUnique">
                    <xsd:selector xpath="dp:map" />
                    <xsd:field xpath="@ref" />
                </xsd:unique>
            </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="objectgridName" type="xsd:string"
            use="required" />
    </xsd:complexType>


    <xsd:complexType name="mapSet">
        <xsd:sequence>
            <xsd:element name="map" type="dp:map" maxOccurs="unbounded"
                minOccurs="1" />
            <xsd:element name="zoneMetadata" type="dp:zoneMetadata"
                maxOccurs="1" minOccurs="0">

                <xsd:key name="zoneRuleName">
                    <xsd:selector xpath="dp:zoneRule" />
                    <xsd:field xpath="@name" />
                </xsd:key>

                <xsd:keyref name="zoneRuleRef"
                    refer="dp:zoneRuleName">
                    <xsd:selector xpath="dp:shardMapping" />
                    <xsd:field xpath="@zoneRuleRef" />
                </xsd:keyref>

            </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="name" type="xsd:string" use="required" />
        <xsd:attribute name="numberOfPartitions" type="xsd:int"
            use="optional" />
        <xsd:attribute name="minSyncReplicas" type="xsd:int"
            use="optional" />
        <xsd:attribute name="maxSyncReplicas" type="xsd:int"
            use="optional" />
        <xsd:attribute name="maxAsyncReplicas" type="xsd:int"
            use="optional" />
        <xsd:attribute name="replicaReadEnabled" type="xsd:boolean"
            use="optional" />
        <xsd:attribute name="numInitialContainers" type="xsd:int"
            use="optional" />
        <xsd:attribute name="autoReplaceLostShards" type="xsd:boolean"
            use="optional" />
        <xsd:attribute name="developmentMode" type="xsd:boolean"
            use="optional" />
        <xsd:attribute name="placementStrategy"
            type="dp:placementStrategy" use="optional" />
        <xsd:attribute name="placementScope"
            type="dp:placementScope" default="DOMAIN_SCOPE" use="optional" />
        <xsd:attribute name="placementScopeTopology"
            type="dp:placementScopeTopology" default="RING" use="optional" />
    </xsd:complexType>

    <xsd:simpleType name="placementStrategy">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="FIXED_PARTITIONS" />
            <xsd:enumeration value="PER_CONTAINER" />
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="placementScope">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="DOMAIN_SCOPE" />
            <xsd:enumeration value="CONTAINER_SCOPE" />
<!--            <xsd:enumeration value="ZONE_SCOPE" /> -->
        </xsd:restriction>
    </xsd:simpleType>

    <xsd:simpleType name="placementScopeTopology">
        <xsd:restriction base="xsd:string">
            <xsd:enumeration value="RING" />
            <xsd:enumeration value="HUB" /> 
        </xsd:restriction>
    </xsd:simpleType>


    <xsd:complexType name="map">
        <xsd:attribute name="ref" use="required" />
    </xsd:complexType>

    <xsd:complexType name="zoneMetadata">
        <xsd:sequence>
            <xsd:element name="shardMapping" type="dp:shardMapping"
                maxOccurs="unbounded" minOccurs="1" />
            <xsd:element name="zoneRule" type="dp:zoneRule"
                maxOccurs="unbounded" minOccurs="1">

            </xsd:element>

        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="shardMapping">
        <xsd:attribute name="shard" use="required">
        	<xsd:simpleType>
        		<xsd:restriction base="xsd:string">
        			<xsd:enumeration value="P"></xsd:enumeration>
        			<xsd:enumeration value="S"></xsd:enumeration>
        			<xsd:enumeration value="A"></xsd:enumeration>
        		</xsd:restriction>
        	</xsd:simpleType>
        </xsd:attribute>
        <xsd:attribute name="zoneRuleRef" type="xsd:string"
            use="required" />
    </xsd:complexType>

    <xsd:complexType name="zoneRule">
        <xsd:sequence>
            <xsd:element name="zone" type="dp:zone"
                maxOccurs="unbounded" minOccurs="1" />
        </xsd:sequence>
        <xsd:attribute name="name" type="xsd:string" use="required" />
        <xsd:attribute name="exclusivePlacement" type="xsd:boolean"
            use="optional" />
    </xsd:complexType>

    <xsd:complexType name="zone">
        <xsd:attribute name="name" type="xsd:string" use="required" />
    </xsd:complexType>

</xsd:schema>