public static interface ChangeFeedProcessor.BuilderDefinition
ChangeFeedProcessor
changeFeedProcessorBuilder definitions for setting the properties.Modifier and Type | Method and Description |
---|---|
ChangeFeedProcessor |
build()
Builds a new instance of the
ChangeFeedProcessor with the specified configuration asynchronously. |
ChangeFeedProcessor.BuilderDefinition |
setFeedContainer(CosmosAsyncContainer feedContainer)
Sets and existing
CosmosAsyncContainer to be used to read from the monitored collection. |
ChangeFeedProcessor.BuilderDefinition |
setHandleChanges(Consumer<List<com.fasterxml.jackson.databind.JsonNode>> consumer)
Sets a consumer function which will be called to process changes.
|
ChangeFeedProcessor.BuilderDefinition |
setHostName(String hostName)
Sets the host name.
|
ChangeFeedProcessor.BuilderDefinition |
setLeaseContainer(CosmosAsyncContainer leaseContainer)
Sets an existing
CosmosAsyncContainer to be used to read from the leases collection. |
ChangeFeedProcessor.BuilderDefinition |
setOptions(ChangeFeedProcessorOptions changeFeedProcessorOptions)
Sets the
ChangeFeedProcessorOptions to be used. |
ChangeFeedProcessor.BuilderDefinition setHostName(String hostName)
hostName
- the name to be used for the host. When using multiple hosts, each host must have a unique
name.ChangeFeedProcessor.BuilderDefinition setFeedContainer(CosmosAsyncContainer feedContainer)
CosmosAsyncContainer
to be used to read from the monitored collection.feedContainer
- the instance of CosmosAsyncContainer
to be used.ChangeFeedProcessor.BuilderDefinition setOptions(ChangeFeedProcessorOptions changeFeedProcessorOptions)
ChangeFeedProcessorOptions
to be used.
Unless specifically set the default values that will be used are: - maximum items per page or FeedResponse: 100 - lease renew interval: 17 seconds - lease acquire interval: 13 seconds - lease expiration interval: 60 seconds - feed poll delay: 5 seconds - maximum scale count: unlimited
changeFeedProcessorOptions
- the change feed processor options to use.ChangeFeedProcessor.BuilderDefinition setHandleChanges(Consumer<List<com.fasterxml.jackson.databind.JsonNode>> consumer)
consumer
- the consumer of ChangeFeedObserver
to call for handling the feeds.ChangeFeedProcessor.BuilderDefinition setLeaseContainer(CosmosAsyncContainer leaseContainer)
CosmosAsyncContainer
to be used to read from the leases collection.leaseContainer
- the instance of CosmosAsyncContainer
to use.ChangeFeedProcessor build()
ChangeFeedProcessor
with the specified configuration asynchronously.ChangeFeedProcessor
.Copyright © 2020 Microsoft Corporation. All rights reserved.