PartitionKeyStatistics Class

public class PartitionKeyStatistics
extends JsonSerializable

Represents the statistics of a logical partition key in the Azure Cosmos DB service.

Constructor Summary

Constructor Description
PartitionKeyStatistics(String jsonString)

Initialize a PartitionKeyStatistics object using the input JSON string.

PartitionKeyStatistics(JSONObject jsonObject)

Constructor.

Method Summary

Modifier and Type Method and Description
PartitionKey getPartitionKey()
long getSizeInKB()

Gets the sizeInKB property.

java.lang.String toString()

Serialize the PartitionKeyStatistics object to a JSON string.

Methods inherited from JsonSerializable

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

PartitionKeyStatistics

public PartitionKeyStatistics(String jsonString)

Initialize a PartitionKeyStatistics object using the input JSON string.

Parameters:

jsonString - the json string that represents the Partition Key Statistics for the logical key within a physical partition.

PartitionKeyStatistics

public PartitionKeyStatistics(JSONObject jsonObject)

Constructor.

Parameters:

jsonObject - the json object that represents the Partition Key Statistics for the logical key within a physical partition.

Method Details

getPartitionKey

public PartitionKey getPartitionKey()

getSizeInKB

public long getSizeInKB()

Gets the sizeInKB property.

Returns:

the size (in KB) of the logical partition key value.

toString

public String toString()

Serialize the PartitionKeyStatistics object to a JSON string.

Overrides:

PartitionKeyStatistics.toString()

Returns:

the string representation of this PartitionKeyStatistics object.

Applies to