你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

ChangeFeedOptions Class

public final class ChangeFeedOptions
extends FeedOptionsBase

Specifies the options associated with change feed methods (enumeration operations) in the Azure Cosmos DB database service.

Constructor Summary

Constructor Description
ChangeFeedOptions()

Method Summary

Modifier and Type Method and Description
java.lang.String getPartitionKeyRangeId()

Get the partition key range id for the current request

boolean isStartFromBeginning()

Get whether change feed should start from beginning (true) or from current (false).

void setPartitionKeyRangeId(String partitionKeyRangeId)

Set the partition key range id for the current request

void setStartFromBeginning(boolean startFromBeginning)

Set whether change feed should start from beginning (true) or from current (false).

Methods inherited from FeedOptionsBase

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.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

ChangeFeedOptions

public ChangeFeedOptions()

Method Details

getPartitionKeyRangeId

public String getPartitionKeyRangeId()

Get the partition key range id for the current request

ChangeFeed requests can be executed against specific partition key ranges. This is used to process the change feed in parallel across multiple consumers.

Returns:

a string indicating the partition key range ID

isStartFromBeginning

public boolean isStartFromBeginning()

Get whether change feed should start from beginning (true) or from current (false). By default it's start from current (false).

Returns:

a boolean value indicating change feed should start from beginning or not

setPartitionKeyRangeId

public void setPartitionKeyRangeId(String partitionKeyRangeId)

Set the partition key range id for the current request

ChangeFeed requests can be executed against specific partition key ranges. This is used to process the change feed in parallel across multiple consumers.

Parameters:

partitionKeyRangeId - a string indicating the partition key range ID

setStartFromBeginning

public void setStartFromBeginning(boolean startFromBeginning)

Set whether change feed should start from beginning (true) or from current (false). By default it's start from current (false).

Parameters:

startFromBeginning - a boolean value indicating change feed should start from beginning or not

Applies to