public static interface ChangeFeedProcessor.BuilderDefinition
ChangeFeedProcessor
builder 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 |
feedContainer(CosmosContainer feedContainer)
Sets and existing
CosmosContainer to be used to read from the monitored collection. |
ChangeFeedProcessor.BuilderDefinition |
handleChanges(Consumer<List<CosmosItemProperties>> consumer)
Sets a consumer function which will be called to process changes.
|
ChangeFeedProcessor.BuilderDefinition |
hostName(String hostName)
Sets the host name.
|
ChangeFeedProcessor.BuilderDefinition |
leaseContainer(CosmosContainer leaseContainer)
Sets an existing
CosmosContainer to be used to read from the leases collection. |
ChangeFeedProcessor.BuilderDefinition |
options(ChangeFeedProcessorOptions changeFeedProcessorOptions)
Sets the
ChangeFeedProcessorOptions to be used. |
ChangeFeedProcessor.BuilderDefinition hostName(String hostName)
hostName
- the name to be used for the host. When using multiple hosts, each host must have a unique name.ChangeFeedProcessor.BuilderDefinition feedContainer(CosmosContainer feedContainer)
CosmosContainer
to be used to read from the monitored collection.feedContainer
- the instance of CosmosContainer
to be used.ChangeFeedProcessor.BuilderDefinition options(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 handleChanges(Consumer<List<CosmosItemProperties>> consumer)
consumer
- the consumer of ChangeFeedObserver
to call for handling the feeds.ChangeFeedProcessor.BuilderDefinition leaseContainer(CosmosContainer leaseContainer)
CosmosContainer
to be used to read from the leases collection.leaseContainer
- the instance of CosmosContainer
to use.ChangeFeedProcessor build()
ChangeFeedProcessor
with the specified configuration asynchronously.ChangeFeedProcessor
.Copyright © 2019. All rights reserved.