Partilhar via


PartitionResolver Interface


public interface PartitionResolver

This is an interface to be implemented for partitioning scenarios and register it at the document client level in the Azure Cosmos DB database service.

Method Summary

Modifier and Type Method and Description
abstract java.lang.String resolveForCreate(Object document)

Gets the collection Self Link or ID based link on which create operation should be directed

abstract java.lang.Iterable<java.lang.String> resolveForRead(Object partitionKey)

Gets an iterator of strings representing SelfLink(s) or ID based link(s) on which read/query operation should be directed

Method Details

resolveForCreate

public abstract String resolveForCreate(Object document)

Gets the collection Self Link or ID based link on which create operation should be directed

Parameters:

document - the document object to be created

Returns:

collection SelfLink or ID based link

resolveForRead

public abstract Iterable resolveForRead(Object partitionKey)

Gets an iterator of strings representing SelfLink(s) or ID based link(s) on which read/query operation should be directed

Parameters:

partitionKey - partition key used to resolve the collection

Returns:

An iterator of strings representing SelfLink(s) or ID based link(s)

Applies to