ChangeFeedOptions Class

  • java.lang.Object

public 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()
ChangeFeedOptions(ChangeFeedOptions options)

Method Summary

Modifier and Type Method and Description
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.

ZonedDateTime getStartDateTime()

Gets the zoned date time to start looking for changes after.

boolean isStartFromBeginning()

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

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.

void setStartDateTime(ZonedDateTime startDateTime)

Sets the zoned date time (exclusive) to start looking for changes after. If this is specified, startFromBeginning is ignored.

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).

Inherited Members

Constructor Details

ChangeFeedOptions

public ChangeFeedOptions()

ChangeFeedOptions

public ChangeFeedOptions(ChangeFeedOptions options)

Parameters:

options

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

getStartDateTime

public ZonedDateTime getStartDateTime()

Gets the zoned date time to start looking for changes after.

Returns:

a zoned date time to start looking for changes after, if set or null otherwise

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

setStartDateTime

public void setStartDateTime(ZonedDateTime startDateTime)

Sets the zoned date time (exclusive) to start looking for changes after. If this is specified, startFromBeginning is ignored.

Parameters:

startDateTime - a zoned date time to start looking for changes after.

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