@Beta(value=V4_12_0, warningText="Preview API - subject to change in non-backwards compatible way") public final class CosmosChangeFeedRequestOptions extends Object
Modifier and Type | Method and Description |
---|---|
static CosmosChangeFeedRequestOptions |
createForProcessingFromBeginning(FeedRange feedRange)
Creates a new
CosmosChangeFeedRequestOptions instance to start processing
change feed items from the beginning of the change feed |
static CosmosChangeFeedRequestOptions |
createForProcessingFromContinuation(String continuation)
Creates a new
CosmosChangeFeedRequestOptions instance to start processing
change feed items from a previous continuation |
static CosmosChangeFeedRequestOptions |
createForProcessingFromNow(FeedRange feedRange)
Creates a new
CosmosChangeFeedRequestOptions instance to start processing
change feed items from the current time - so only events for all future changes will be
retrieved |
static CosmosChangeFeedRequestOptions |
createForProcessingFromPointInTime(Instant pointInTime,
FeedRange feedRange)
Creates a new
CosmosChangeFeedRequestOptions instance to start processing
change feed items from a certain point in time |
CosmosChangeFeedRequestOptions |
fullFidelity()
Changes the change feed mode so that the change feed will contain events for creations,
deletes as well as all intermediary snapshots for updates.
|
FeedRange |
getFeedRange() |
int |
getMaxItemCount()
Gets the maximum number of items to be returned in the enumeration
operation.
|
int |
getMaxPrefetchPageCount()
Gets the maximum number of pages that will be prefetched from the backend asynchronously
in the background.
|
String |
getThroughputControlGroupName()
Get the throughput control group name.
|
boolean |
isQuotaInfoEnabled()
Gets the quotaInfoEnabled setting for change feed request in the Azure Cosmos DB database service.
|
CosmosChangeFeedRequestOptions |
setMaxItemCount(int maxItemCount)
Sets the maximum number of items to be returned in the enumeration
operation.
|
CosmosChangeFeedRequestOptions |
setMaxPrefetchPageCount(int maxPrefetchPageCount)
Sets the maximum number of pages that will be prefetched from the backend asynchronously
in the background.
|
void |
setQuotaInfoEnabled(boolean quotaInfoEnabled)
Gets the quotaInfoEnabled setting for change feed request in the Azure Cosmos DB database service.
|
CosmosChangeFeedRequestOptions |
setThroughputControlGroupName(String throughputControlGroupName)
Set the throughput control group name.
|
@Beta(value=V4_12_0, warningText="Preview API - subject to change in non-backwards compatible way") public FeedRange getFeedRange()
@Beta(value=V4_12_0, warningText="Preview API - subject to change in non-backwards compatible way") public int getMaxItemCount()
@Beta(value=V4_12_0, warningText="Preview API - subject to change in non-backwards compatible way") public CosmosChangeFeedRequestOptions setMaxItemCount(int maxItemCount)
maxItemCount
- the max number of items.@Beta(value=V4_12_0, warningText="Preview API - subject to change in non-backwards compatible way") public int getMaxPrefetchPageCount()
@Beta(value=V4_12_0, warningText="Preview API - subject to change in non-backwards compatible way") public CosmosChangeFeedRequestOptions setMaxPrefetchPageCount(int maxPrefetchPageCount)
maxPrefetchPageCount
- the max number of pages that will be prefetched from the backend
asynchronously in the background@Beta(value=V4_12_0, warningText="Preview API - subject to change in non-backwards compatible way") public boolean isQuotaInfoEnabled()
@Beta(value=V4_12_0, warningText="Preview API - subject to change in non-backwards compatible way") public void setQuotaInfoEnabled(boolean quotaInfoEnabled)
quotaInfoEnabled
- a boolean value indicating whether quotaInfoEnabled is enabled or not@Beta(value=V4_12_0, warningText="Preview API - subject to change in non-backwards compatible way") public static CosmosChangeFeedRequestOptions createForProcessingFromBeginning(FeedRange feedRange)
CosmosChangeFeedRequestOptions
instance to start processing
change feed items from the beginning of the change feedfeedRange
- The FeedRange
that is used to define the scope (entire container,
logical partition or subset of a container)CosmosChangeFeedRequestOptions
instance@Beta(value=V4_12_0, warningText="Preview API - subject to change in non-backwards compatible way") public static CosmosChangeFeedRequestOptions createForProcessingFromContinuation(String continuation)
CosmosChangeFeedRequestOptions
instance to start processing
change feed items from a previous continuationcontinuation
- The continuation that was retrieved from a previously retrieved
FeedResponseCosmosChangeFeedRequestOptions
instance@Beta(value=V4_12_0, warningText="Preview API - subject to change in non-backwards compatible way") public static CosmosChangeFeedRequestOptions createForProcessingFromNow(FeedRange feedRange)
CosmosChangeFeedRequestOptions
instance to start processing
change feed items from the current time - so only events for all future changes will be
retrievedfeedRange
- The FeedRange
that is used to define the scope (entire container,
logical partition or subset of a container)CosmosChangeFeedRequestOptions
instance@Beta(value=V4_12_0, warningText="Preview API - subject to change in non-backwards compatible way") public static CosmosChangeFeedRequestOptions createForProcessingFromPointInTime(Instant pointInTime, FeedRange feedRange)
CosmosChangeFeedRequestOptions
instance to start processing
change feed items from a certain point in timepointInTime
- The point in time from which processing of change feed events should startfeedRange
- The FeedRange
that is used to define the scope (entire container,
logical partition or subset of a container)CosmosChangeFeedRequestOptions
instance@Beta(value=V4_12_0, warningText="Preview API - subject to change in non-backwards compatible way") public CosmosChangeFeedRequestOptions fullFidelity()
ChangeFeedPolicy
Intermediary snapshots of changes as well as deleted documents would be available for processing for 8 minutes before they vanish. When enabling full fidelity mode you will only be able to process change feed events within the retention window configured in the change feed policy of the container. If you attempt to process a change feed after more than the retention window an error (Status Code 400) will be returned because the events for intermediary updates and deletes have vanished. It would still be possible to process changes using Incremental mode even when configuring a full fidelity change feed policy with retention window on the container and when using Incremental mode it doesn't matter whether your are out of the retention window or not - but no events for deletes or intermediary updates would be included. When events are not getting processed within the retention window it is also possible to continue processing future events in full fidelity mode by querying the change feed with a new CosmosChangeFeedRequestOptions instance.
CosmosChangeFeedRequestOptions
instance with full fidelity mode enabled@Beta(value=V4_13_0, warningText="Preview API - subject to change in non-backwards compatible way") public String getThroughputControlGroupName()
@Beta(value=V4_13_0, warningText="Preview API - subject to change in non-backwards compatible way") public CosmosChangeFeedRequestOptions setThroughputControlGroupName(String throughputControlGroupName)
throughputControlGroupName
- The throughput control group name.CosmosChangeFeedRequestOptions
.Copyright © 2021 Microsoft Corporation. All rights reserved.