PartitionKeyRange Class

public class PartitionKeyRange extends Resource

Represent a partition key range in the Azure Cosmos DB database service.

Field Summary

Modifier and Type Field and Description
final String MASTER_PARTITION_KEY_RANGE_ID
final String MAXIMUM_EXCLUSIVE_EFFECTIVE_PARTITION_KEY
final String MINIMUM_INCLUSIVE_EFFECTIVE_PARTITION_KEY

Constructor Summary

Constructor Description
PartitionKeyRange()

Initialize a partition key range object.

PartitionKeyRange(String jsonString)

Initialize a partition key range object from json string.

PartitionKeyRange(String id, String minInclusive, String maxExclusive)
PartitionKeyRange(String id, String minInclusive, String maxExclusive, List<String> parents)

Method Summary

Modifier and Type Method and Description
boolean equals(Object obj)
String getMaxExclusive()
String getMinInclusive()
List<String> getParents()

Used internally to indicate the ID of the parent range

int hashCode()
void setMaxExclusive(String maxExclusive)
void setMinInclusive(String minInclusive)
Range<String> toRange()

Inherited Members

Field Details

MASTER_PARTITION_KEY_RANGE_ID

public static final String MASTER_PARTITION_KEY_RANGE_ID= "M"

MAXIMUM_EXCLUSIVE_EFFECTIVE_PARTITION_KEY

public static final String MAXIMUM_EXCLUSIVE_EFFECTIVE_PARTITION_KEY= "FF"

MINIMUM_INCLUSIVE_EFFECTIVE_PARTITION_KEY

public static final String MINIMUM_INCLUSIVE_EFFECTIVE_PARTITION_KEY= ""

Constructor Details

PartitionKeyRange

public PartitionKeyRange()

Initialize a partition key range object.

PartitionKeyRange

public PartitionKeyRange(String jsonString)

Initialize a partition key range object from json string.

Parameters:

jsonString - the json string that represents the partition key range object.

PartitionKeyRange

public PartitionKeyRange(String id, String minInclusive, String maxExclusive)

Parameters:

id
minInclusive
maxExclusive

PartitionKeyRange

public PartitionKeyRange(String id, String minInclusive, String maxExclusive, List parents)

Parameters:

id
minInclusive
maxExclusive
parents

Method Details

equals

public boolean equals(Object obj)

Parameters:

obj

getMaxExclusive

public String getMaxExclusive()

getMinInclusive

public String getMinInclusive()

getParents

public List getParents()

Used internally to indicate the ID of the parent range

Returns:

a list partition key range ID

hashCode

public int hashCode()

setMaxExclusive

public void setMaxExclusive(String maxExclusive)

Parameters:

maxExclusive

setMinInclusive

public void setMinInclusive(String minInclusive)

Parameters:

minInclusive

toRange

public Range toRange()

Applies to