com.microsoft.azure.documentdb.ChangeFeedOptions Maven / Gradle / Ivy
package com.microsoft.azure.documentdb;
/**
* Specifies the options associated with change feed methods (enumeration operations) in the Azure Cosmos DB database service.
*/
public final class ChangeFeedOptions extends FeedOptionsBase {
private String partitionKeyRangeId;
private boolean startFromBeginning;
/**
* 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.
*
*
* @return a string indicating the partition key range ID
* @see PartitionKeyRange
* @see DocumentClient#readPartitionKeyRanges(String, FeedOptions)
*/
public String getPartitionKeyRangeId() {
return 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.
*
*
* @param partitionKeyRangeId a string indicating the partition key range ID
* @see PartitionKeyRange
* @see DocumentClient#readPartitionKeyRanges(String, FeedOptions)
*/
public void setPartitionKeyRangeId(String partitionKeyRangeId) {
this.partitionKeyRangeId = partitionKeyRangeId;
}
/**
* Get whether change feed should start from beginning (true) or from current (false).
* By default it's start from current (false).
*
* @return a boolean value indicating change feed should start from beginning or not
*/
public boolean isStartFromBeginning() {
return startFromBeginning;
}
/**
* Set whether change feed should start from beginning (true) or from current (false).
* By default it's start from current (false).
*
* @param startFromBeginning a boolean value indicating change feed should start from beginning or not
*/
public void setStartFromBeginning(boolean startFromBeginning) {
this.startFromBeginning = startFromBeginning;
}
}