160 строки
22 KiB
YAML
160 строки
22 KiB
YAML
### YamlMime:JavaType
|
|
uid: "com.azure.cosmos.ChangeFeedProcessorBuilder"
|
|
fullName: "com.azure.cosmos.ChangeFeedProcessorBuilder"
|
|
name: "ChangeFeedProcessorBuilder"
|
|
nameWithType: "ChangeFeedProcessorBuilder"
|
|
summary: "Helper class to build a <xref uid=\"com.azure.cosmos.ChangeFeedProcessor\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ChangeFeedProcessor\"></xref> instance."
|
|
inheritances:
|
|
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
|
|
inheritedClassMethods:
|
|
- classRef: "java.lang.<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
|
|
methodsRef:
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--\">clone</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-\">equals</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--\">finalize</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--\">getClass</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--\">hashCode</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--\">notify</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--\">notifyAll</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--\">toString</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--\">wait</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-\">wait</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-\">wait</a>"
|
|
syntax: "public class **ChangeFeedProcessorBuilder**"
|
|
constructors:
|
|
- uid: "com.azure.cosmos.ChangeFeedProcessorBuilder.ChangeFeedProcessorBuilder()"
|
|
fullName: "com.azure.cosmos.ChangeFeedProcessorBuilder.ChangeFeedProcessorBuilder()"
|
|
name: "ChangeFeedProcessorBuilder()"
|
|
nameWithType: "ChangeFeedProcessorBuilder.ChangeFeedProcessorBuilder()"
|
|
summary: "Instantiates a new Cosmos a new Change<wbr>Feed<wbr>Processor builder."
|
|
syntax: "public ChangeFeedProcessorBuilder()"
|
|
desc: "Instantiates a new Cosmos a new ChangeFeedProcessor builder."
|
|
methods:
|
|
- uid: "com.azure.cosmos.ChangeFeedProcessorBuilder.buildChangeFeedProcessor()"
|
|
fullName: "com.azure.cosmos.ChangeFeedProcessorBuilder.buildChangeFeedProcessor()"
|
|
name: "buildChangeFeedProcessor()"
|
|
nameWithType: "ChangeFeedProcessorBuilder.buildChangeFeedProcessor()"
|
|
summary: "Builds a new instance of the <xref uid=\"com.azure.cosmos.ChangeFeedProcessor\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ChangeFeedProcessor\"></xref> with the specified configuration."
|
|
syntax: "public ChangeFeedProcessor buildChangeFeedProcessor()"
|
|
desc: "Builds a new instance of the <xref uid=\"com.azure.cosmos.ChangeFeedProcessor\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ChangeFeedProcessor\"></xref> with the specified configuration."
|
|
returns:
|
|
description: "an instance of <xref uid=\"com.azure.cosmos.ChangeFeedProcessor\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ChangeFeedProcessor\"></xref>."
|
|
type: "<xref href=\"com.azure.cosmos.ChangeFeedProcessor?alt=com.azure.cosmos.ChangeFeedProcessor&text=ChangeFeedProcessor\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.cosmos.ChangeFeedProcessorBuilder.feedContainer(com.azure.cosmos.CosmosAsyncContainer)"
|
|
fullName: "com.azure.cosmos.ChangeFeedProcessorBuilder.feedContainer(CosmosAsyncContainer feedContainer)"
|
|
name: "feedContainer(CosmosAsyncContainer feedContainer)"
|
|
nameWithType: "ChangeFeedProcessorBuilder.feedContainer(CosmosAsyncContainer feedContainer)"
|
|
summary: "Sets and existing <xref uid=\"com.azure.cosmos.CosmosAsyncContainer\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosAsyncContainer\"></xref> to be used to read from the monitored container."
|
|
parameters:
|
|
- description: "the instance of <xref uid=\"com.azure.cosmos.CosmosAsyncContainer\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosAsyncContainer\"></xref> to be used."
|
|
name: "feedContainer"
|
|
type: "<xref href=\"com.azure.cosmos.CosmosAsyncContainer?alt=com.azure.cosmos.CosmosAsyncContainer&text=CosmosAsyncContainer\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public ChangeFeedProcessorBuilder feedContainer(CosmosAsyncContainer feedContainer)"
|
|
desc: "Sets and existing <xref uid=\"com.azure.cosmos.CosmosAsyncContainer\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosAsyncContainer\"></xref> to be used to read from the monitored container."
|
|
returns:
|
|
description: "current Builder."
|
|
type: "<xref href=\"com.azure.cosmos.ChangeFeedProcessorBuilder?alt=com.azure.cosmos.ChangeFeedProcessorBuilder&text=ChangeFeedProcessorBuilder\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.cosmos.ChangeFeedProcessorBuilder.handleAllVersionsAndDeletesChanges(java.util.function.BiConsumer<java.util.List<com.azure.cosmos.models.ChangeFeedProcessorItem>,com.azure.cosmos.ChangeFeedProcessorContext>)"
|
|
fullName: "com.azure.cosmos.ChangeFeedProcessorBuilder.handleAllVersionsAndDeletesChanges(BiConsumer<List<ChangeFeedProcessorItem>,ChangeFeedProcessorContext> biConsumer)"
|
|
name: "handleAllVersionsAndDeletesChanges(BiConsumer<List<ChangeFeedProcessorItem>,ChangeFeedProcessorContext> biConsumer)"
|
|
nameWithType: "ChangeFeedProcessorBuilder.handleAllVersionsAndDeletesChanges(BiConsumer<List<ChangeFeedProcessorItem>,ChangeFeedProcessorContext> biConsumer)"
|
|
summary: "Sets a <xref uid=\"java.util.function.BiConsumer\" data-throw-if-not-resolved=\"false\" data-raw-source=\"BiConsumer\"></xref> function which will be called to process changes for All<wbr>Versions<wbr>And<wbr>Deletes change feed mode."
|
|
parameters:
|
|
- description: "the <xref uid=\"java.util.function.BiConsumer\" data-throw-if-not-resolved=\"false\" data-raw-source=\"BiConsumer\"></xref> to call for handling the feeds and the <xref uid=\"com.azure.cosmos.ChangeFeedProcessorContext\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ChangeFeedProcessorContext\"></xref> instance."
|
|
name: "biConsumer"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/function/BiConsumer.html\">BiConsumer</a><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/List.html\">List</a><<xref href=\"com.azure.cosmos.models.ChangeFeedProcessorItem?alt=com.azure.cosmos.models.ChangeFeedProcessorItem&text=ChangeFeedProcessorItem\" data-throw-if-not-resolved=\"False\" />>,<xref href=\"com.azure.cosmos.ChangeFeedProcessorContext?alt=com.azure.cosmos.ChangeFeedProcessorContext&text=ChangeFeedProcessorContext\" data-throw-if-not-resolved=\"False\" />>"
|
|
syntax: "public ChangeFeedProcessorBuilder handleAllVersionsAndDeletesChanges(BiConsumer<List<ChangeFeedProcessorItem>,ChangeFeedProcessorContext> biConsumer)"
|
|
desc: "Sets a <xref uid=\"java.util.function.BiConsumer\" data-throw-if-not-resolved=\"false\" data-raw-source=\"BiConsumer\"></xref> function which will be called to process changes for AllVersionsAndDeletes change feed mode.\n\n```java\n.handleAllVersionsAndDeletesChanges((docs, context) -> {\n for (ChangeFeedProcessorItem item : docs) {\n // Implementation for handling and processing of each ChangeFeedProcessorItem item goes here\n }\n String leaseToken = context.getLeaseToken();\n // Handling of the lease token corresponding to a batch of change feed processor item goes here\n })\n```"
|
|
returns:
|
|
description: "current Builder."
|
|
type: "<xref href=\"com.azure.cosmos.ChangeFeedProcessorBuilder?alt=com.azure.cosmos.ChangeFeedProcessorBuilder&text=ChangeFeedProcessorBuilder\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.cosmos.ChangeFeedProcessorBuilder.handleAllVersionsAndDeletesChanges(java.util.function.Consumer<java.util.List<com.azure.cosmos.models.ChangeFeedProcessorItem>>)"
|
|
fullName: "com.azure.cosmos.ChangeFeedProcessorBuilder.handleAllVersionsAndDeletesChanges(Consumer<List<ChangeFeedProcessorItem>> consumer)"
|
|
name: "handleAllVersionsAndDeletesChanges(Consumer<List<ChangeFeedProcessorItem>> consumer)"
|
|
nameWithType: "ChangeFeedProcessorBuilder.handleAllVersionsAndDeletesChanges(Consumer<List<ChangeFeedProcessorItem>> consumer)"
|
|
summary: "Sets a consumer function which will be called to process changes for All<wbr>Versions<wbr>And<wbr>Deletes change feed mode."
|
|
parameters:
|
|
- description: "the <xref uid=\"java.util.function.Consumer\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Consumer\"></xref> to call for handling the feeds."
|
|
name: "consumer"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html\">Consumer</a><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/List.html\">List</a><<xref href=\"com.azure.cosmos.models.ChangeFeedProcessorItem?alt=com.azure.cosmos.models.ChangeFeedProcessorItem&text=ChangeFeedProcessorItem\" data-throw-if-not-resolved=\"False\" />>>"
|
|
syntax: "public ChangeFeedProcessorBuilder handleAllVersionsAndDeletesChanges(Consumer<List<ChangeFeedProcessorItem>> consumer)"
|
|
desc: "Sets a consumer function which will be called to process changes for AllVersionsAndDeletes change feed mode.\n\n```java\n.handleAllVersionsAndDeletesChanges(docs -> {\n for (ChangeFeedProcessorItem item : docs) {\n // Implementation for handling and processing of each ChangeFeedProcessorItem item goes here\n }\n })\n```"
|
|
returns:
|
|
description: "current Builder."
|
|
type: "<xref href=\"com.azure.cosmos.ChangeFeedProcessorBuilder?alt=com.azure.cosmos.ChangeFeedProcessorBuilder&text=ChangeFeedProcessorBuilder\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.cosmos.ChangeFeedProcessorBuilder.handleChanges(java.util.function.Consumer<java.util.List<com.fasterxml.jackson.databind.JsonNode>>)"
|
|
fullName: "com.azure.cosmos.ChangeFeedProcessorBuilder.handleChanges(Consumer<List<JsonNode>> consumer)"
|
|
name: "handleChanges(Consumer<List<JsonNode>> consumer)"
|
|
nameWithType: "ChangeFeedProcessorBuilder.handleChanges(Consumer<List<JsonNode>> consumer)"
|
|
summary: "Sets a consumer function which will be called to process changes for Latest<wbr>Version change feed mode."
|
|
parameters:
|
|
- description: "the <xref uid=\"java.util.function.Consumer\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Consumer\"></xref> to call for handling the feeds."
|
|
name: "consumer"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html\">Consumer</a><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/List.html\">List</a><<xref href=\"com.fasterxml.jackson.databind.JsonNode?alt=com.fasterxml.jackson.databind.JsonNode&text=JsonNode\" data-throw-if-not-resolved=\"False\" />>>"
|
|
syntax: "public ChangeFeedProcessorBuilder handleChanges(Consumer<List<JsonNode>> consumer)"
|
|
desc: "Sets a consumer function which will be called to process changes for LatestVersion change feed mode. Attention! This API is not merge proof, please use <xref uid=\"com.azure.cosmos.ChangeFeedProcessorBuilder.handleLatestVersionChanges*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#handleLatestVersionChanges(Consumer)\"></xref> instead.\n\n```java\n.handleChanges(docs -> {\n for (JsonNode item : docs) {\n // Implementation for handling and processing of each JsonNode item goes here\n }\n })\n```"
|
|
returns:
|
|
description: "current Builder."
|
|
type: "<xref href=\"com.azure.cosmos.ChangeFeedProcessorBuilder?alt=com.azure.cosmos.ChangeFeedProcessorBuilder&text=ChangeFeedProcessorBuilder\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.cosmos.ChangeFeedProcessorBuilder.handleLatestVersionChanges(java.util.function.Consumer<java.util.List<com.azure.cosmos.models.ChangeFeedProcessorItem>>)"
|
|
fullName: "com.azure.cosmos.ChangeFeedProcessorBuilder.handleLatestVersionChanges(Consumer<List<ChangeFeedProcessorItem>> consumer)"
|
|
name: "handleLatestVersionChanges(Consumer<List<ChangeFeedProcessorItem>> consumer)"
|
|
nameWithType: "ChangeFeedProcessorBuilder.handleLatestVersionChanges(Consumer<List<ChangeFeedProcessorItem>> consumer)"
|
|
summary: "Sets a consumer function which will be called to process changes for Latest<wbr>Version change feed mode."
|
|
parameters:
|
|
- description: "the <xref uid=\"java.util.function.Consumer\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Consumer\"></xref> to call for handling the feeds."
|
|
name: "consumer"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/function/Consumer.html\">Consumer</a><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/List.html\">List</a><<xref href=\"com.azure.cosmos.models.ChangeFeedProcessorItem?alt=com.azure.cosmos.models.ChangeFeedProcessorItem&text=ChangeFeedProcessorItem\" data-throw-if-not-resolved=\"False\" />>>"
|
|
syntax: "public ChangeFeedProcessorBuilder handleLatestVersionChanges(Consumer<List<ChangeFeedProcessorItem>> consumer)"
|
|
desc: "Sets a consumer function which will be called to process changes for LatestVersion change feed mode.\n\n```java\n.handleLatestVersionChanges(changeFeedProcessorItems -> {\n for (ChangeFeedProcessorItem item : changeFeedProcessorItems) {\n // Implementation for handling and processing of each change feed item goes here\n }\n })\n```"
|
|
returns:
|
|
description: "current Builder."
|
|
type: "<xref href=\"com.azure.cosmos.ChangeFeedProcessorBuilder?alt=com.azure.cosmos.ChangeFeedProcessorBuilder&text=ChangeFeedProcessorBuilder\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.cosmos.ChangeFeedProcessorBuilder.hostName(java.lang.String)"
|
|
fullName: "com.azure.cosmos.ChangeFeedProcessorBuilder.hostName(String hostName)"
|
|
name: "hostName(String hostName)"
|
|
nameWithType: "ChangeFeedProcessorBuilder.hostName(String hostName)"
|
|
summary: "Sets the host name."
|
|
parameters:
|
|
- description: "the name to be used for the host. When using multiple hosts, each host must have a unique\n name."
|
|
name: "hostName"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
syntax: "public ChangeFeedProcessorBuilder hostName(String hostName)"
|
|
desc: "Sets the host name."
|
|
returns:
|
|
description: "current Builder."
|
|
type: "<xref href=\"com.azure.cosmos.ChangeFeedProcessorBuilder?alt=com.azure.cosmos.ChangeFeedProcessorBuilder&text=ChangeFeedProcessorBuilder\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.cosmos.ChangeFeedProcessorBuilder.leaseContainer(com.azure.cosmos.CosmosAsyncContainer)"
|
|
fullName: "com.azure.cosmos.ChangeFeedProcessorBuilder.leaseContainer(CosmosAsyncContainer leaseContainer)"
|
|
name: "leaseContainer(CosmosAsyncContainer leaseContainer)"
|
|
nameWithType: "ChangeFeedProcessorBuilder.leaseContainer(CosmosAsyncContainer leaseContainer)"
|
|
summary: "Sets an existing <xref uid=\"com.azure.cosmos.CosmosAsyncContainer\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosAsyncContainer\"></xref> to be used to read from the leases container."
|
|
parameters:
|
|
- description: "the instance of <xref uid=\"com.azure.cosmos.CosmosAsyncContainer\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosAsyncContainer\"></xref> to use."
|
|
name: "leaseContainer"
|
|
type: "<xref href=\"com.azure.cosmos.CosmosAsyncContainer?alt=com.azure.cosmos.CosmosAsyncContainer&text=CosmosAsyncContainer\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public ChangeFeedProcessorBuilder leaseContainer(CosmosAsyncContainer leaseContainer)"
|
|
desc: "Sets an existing <xref uid=\"com.azure.cosmos.CosmosAsyncContainer\" data-throw-if-not-resolved=\"false\" data-raw-source=\"CosmosAsyncContainer\"></xref> to be used to read from the leases container."
|
|
returns:
|
|
description: "current Builder."
|
|
type: "<xref href=\"com.azure.cosmos.ChangeFeedProcessorBuilder?alt=com.azure.cosmos.ChangeFeedProcessorBuilder&text=ChangeFeedProcessorBuilder\" data-throw-if-not-resolved=\"False\" />"
|
|
- uid: "com.azure.cosmos.ChangeFeedProcessorBuilder.options(com.azure.cosmos.models.ChangeFeedProcessorOptions)"
|
|
fullName: "com.azure.cosmos.ChangeFeedProcessorBuilder.options(ChangeFeedProcessorOptions changeFeedProcessorOptions)"
|
|
name: "options(ChangeFeedProcessorOptions changeFeedProcessorOptions)"
|
|
nameWithType: "ChangeFeedProcessorBuilder.options(ChangeFeedProcessorOptions changeFeedProcessorOptions)"
|
|
summary: "Sets the <xref uid=\"com.azure.cosmos.models.ChangeFeedProcessorOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ChangeFeedProcessorOptions\"></xref> to be used."
|
|
parameters:
|
|
- description: "the change feed processor options to use."
|
|
name: "changeFeedProcessorOptions"
|
|
type: "<xref href=\"com.azure.cosmos.models.ChangeFeedProcessorOptions?alt=com.azure.cosmos.models.ChangeFeedProcessorOptions&text=ChangeFeedProcessorOptions\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public ChangeFeedProcessorBuilder options(ChangeFeedProcessorOptions changeFeedProcessorOptions)"
|
|
desc: "Sets the <xref uid=\"com.azure.cosmos.models.ChangeFeedProcessorOptions\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ChangeFeedProcessorOptions\"></xref> to be used. Unless specifically set the default values that will be used are:\n\n * maximum items per page or FeedResponse: 100\n * lease renew interval: 17 seconds\n * lease acquire interval: 13 seconds\n * lease expiration interval: 60 seconds\n * feed poll delay: 5 seconds\n * maximum scale count: unlimited"
|
|
returns:
|
|
description: "current Builder."
|
|
type: "<xref href=\"com.azure.cosmos.ChangeFeedProcessorBuilder?alt=com.azure.cosmos.ChangeFeedProcessorBuilder&text=ChangeFeedProcessorBuilder\" data-throw-if-not-resolved=\"False\" />"
|
|
type: "class"
|
|
desc: "Helper class to build a <xref uid=\"com.azure.cosmos.ChangeFeedProcessor\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ChangeFeedProcessor\"></xref> instance. Below is an example of building ChangeFeedProcessor for LatestVersion mode.\n\n```java\nChangeFeedProcessor changeFeedProcessor = new ChangeFeedProcessorBuilder()\n .hostName(hostName)\n .feedContainer(feedContainer)\n .leaseContainer(leaseContainer)\n .handleChanges(docs -> {\n for (JsonNode item : docs) {\n // Implementation for handling and processing of each JsonNode item goes here\n }\n })\n .buildChangeFeedProcessor();\n```\n\nBelow is an example of building ChangeFeedProcessor with throughput control for handleChanges.\n\n```java\nThroughputControlGroupConfig throughputControlGroupConfig =\n new ThroughputControlGroupConfigBuilder()\n .groupName(\"cfp\")\n .targetThroughput(300)\n .priorityLevel(PriorityLevel.LOW)\n .build();\n ChangeFeedProcessor changeFeedProcessor = new ChangeFeedProcessorBuilder()\n .hostName(hostName)\n .feedContainer(feedContainer)\n .leaseContainer(leaseContainer)\n .handleChanges(docs -> {\n for (JsonNode item : docs) {\n // Implementation for handling and processing of each JsonNode item goes here\n }\n })\n .options(\n new ChangeFeedProcessorOptions()\n .setFeedPollThroughputControlConfig(throughputControlGroupConfig)\n )\n .buildChangeFeedProcessor();\n```\n\nBelow is an example of building ChangeFeedProcessor with throughput control for LatestVersion mode.\n\n```java\nThroughputControlGroupConfig throughputControlGroupConfig =\n new ThroughputControlGroupConfigBuilder()\n .groupName(\"cfp\")\n .targetThroughput(300)\n .priorityLevel(PriorityLevel.LOW)\n .build();\n ChangeFeedProcessor changeFeedProcessor = new ChangeFeedProcessorBuilder()\n .hostName(hostName)\n .feedContainer(feedContainer)\n .leaseContainer(leaseContainer)\n .handleLatestVersionChanges(changeFeedProcessorItems -> {\n for (ChangeFeedProcessorItem item : changeFeedProcessorItems) {\n // Implementation for handling and processing of each change feed item goes here\n }\n })\n .options(\n new ChangeFeedProcessorOptions()\n .setFeedPollThroughputControlConfig(throughputControlGroupConfig)\n )\n .buildChangeFeedProcessor();\n```\n\nBelow is an example of building ChangeFeedProcessor for AllVersionsAndDeletes mode.\n\n```java\nChangeFeedProcessor changeFeedProcessor = new ChangeFeedProcessorBuilder()\n .hostName(hostName)\n .feedContainer(feedContainer)\n .leaseContainer(leaseContainer)\n .handleAllVersionsAndDeletesChanges(docs -> {\n for (ChangeFeedProcessorItem item : docs) {\n // Implementation for handling and processing of each ChangeFeedProcessorItem item goes here\n }\n })\n .buildChangeFeedProcessor();\n```\n\nBelow is an example of building ChangeFeedProcessor for AllVersionsAndDeletes mode when also wishing to process a <xref uid=\"com.azure.cosmos.ChangeFeedProcessorContext\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ChangeFeedProcessorContext\"></xref>.\n\n```java\nChangeFeedProcessor changeFeedProcessor = new ChangeFeedProcessorBuilder()\n .hostName(hostName)\n .feedContainer(feedContainer)\n .leaseContainer(leaseContainer)\n .handleAllVersionsAndDeletesChanges((docs, context) -> {\n for (ChangeFeedProcessorItem item : docs) {\n // Implementation for handling and processing of each ChangeFeedProcessorItem item goes here\n }\n String leaseToken = context.getLeaseToken();\n // Handling of the lease token corresponding to a batch of change feed processor item goes here\n })\n .buildChangeFeedProcessor();\n```"
|
|
metadata: {}
|
|
package: "com.azure.cosmos"
|
|
artifact: com.azure:azure-cosmos:4.63.4
|