Package com.azure.data.cosmos
Interface ChangeFeedProcessor.BuilderDefinition
-
- Enclosing interface:
- ChangeFeedProcessor
public static interface ChangeFeedProcessor.BuilderDefinition
TheChangeFeedProcessor
builder definitions for setting the properties.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ChangeFeedProcessor
build()
Builds a new instance of theChangeFeedProcessor
with the specified configuration asynchronously.ChangeFeedProcessor.BuilderDefinition
feedContainer(CosmosContainer feedContainer)
Sets and existingCosmosContainer
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 existingCosmosContainer
to be used to read from the leases collection.ChangeFeedProcessor.BuilderDefinition
options(ChangeFeedProcessorOptions changeFeedProcessorOptions)
Sets theChangeFeedProcessorOptions
to be used.
-
-
-
Method Detail
-
hostName
ChangeFeedProcessor.BuilderDefinition hostName(String hostName)
Sets the host name.- Parameters:
hostName
- the name to be used for the host. When using multiple hosts, each host must have a unique name.- Returns:
- current Builder.
-
feedContainer
ChangeFeedProcessor.BuilderDefinition feedContainer(CosmosContainer feedContainer)
Sets and existingCosmosContainer
to be used to read from the monitored collection.- Parameters:
feedContainer
- the instance ofCosmosContainer
to be used.- Returns:
- current Builder.
-
options
ChangeFeedProcessor.BuilderDefinition options(ChangeFeedProcessorOptions changeFeedProcessorOptions)
Sets theChangeFeedProcessorOptions
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
- Parameters:
changeFeedProcessorOptions
- the change feed processor options to use.- Returns:
- current Builder.
-
handleChanges
ChangeFeedProcessor.BuilderDefinition handleChanges(Consumer<List<CosmosItemProperties>> consumer)
Sets a consumer function which will be called to process changes.- Parameters:
consumer
- the consumer ofChangeFeedObserver
to call for handling the feeds.- Returns:
- current Builder.
-
leaseContainer
ChangeFeedProcessor.BuilderDefinition leaseContainer(CosmosContainer leaseContainer)
Sets an existingCosmosContainer
to be used to read from the leases collection.- Parameters:
leaseContainer
- the instance ofCosmosContainer
to use.- Returns:
- current Builder.
-
build
ChangeFeedProcessor build()
Builds a new instance of theChangeFeedProcessor
with the specified configuration asynchronously.- Returns:
- an instance of
ChangeFeedProcessor
.
-
-