ChangeFeedEncryptionProcessorBuilder Class
- java.
lang. Object - com.
azure. cosmos. encryption. ChangeFeedEncryptionProcessorBuilder
- com.
public final class ChangeFeedEncryptionProcessorBuilder
Helper class to build a ChangeFeedProcessor instance for encryption feed container.
ChangeFeedProcessor changeFeedProcessor = new ChangeFeedProcessorBuilder()
.hostName(hostName)
.feedContainer(feedContainer) //
.leaseContainer(leaseContainer)
.handleChanges(docs -> {
for (JsonNode item : docs) {
// Implementation for handling and processing of each JsonNode item goes here
}
})
.buildChangeFeedProcessor();
Constructor Summary
Constructor | Description |
---|---|
ChangeFeedEncryptionProcessorBuilder() |
Helper class to build a encryption supported ChangeFeedProcessor instance. |
Method Summary
Modifier and Type | Method and Description |
---|---|
Change |
buildChangeFeedProcessor()
Builds a new instance of the ChangeFeedProcessor with the specified configuration. |
Change |
feedContainer(CosmosEncryptionAsyncContainer feedContainer)
Sets an existing CosmosEncryptionAsyncContainer to be used to read from the monitored container. |
Change |
handleChanges(Consumer<List<JsonNode>> consumer)
Sets a consumer function which will be called to process changes. |
Change |
hostName(String hostName)
Sets the host name. |
Change |
leaseContainer(CosmosAsyncContainer leaseContainer)
Sets an existing CosmosAsyncContainer to be used to read from the leases container. |
Change |
options(ChangeFeedProcessorOptions changeFeedProcessorOptions)
Sets the ChangeFeedProcessorOptions to be used. |
Methods inherited from java.lang.Object
Constructor Details
ChangeFeedEncryptionProcessorBuilder
public ChangeFeedEncryptionProcessorBuilder()
Helper class to build a encryption supported ChangeFeedProcessor instance.
Method Details
buildChangeFeedProcessor
public ChangeFeedProcessor buildChangeFeedProcessor()
Builds a new instance of the ChangeFeedProcessor with the specified configuration.
Returns:
feedContainer
public ChangeFeedEncryptionProcessorBuilder feedContainer(CosmosEncryptionAsyncContainer feedContainer)
Sets an existing CosmosEncryptionAsyncContainer to be used to read from the monitored container.
Parameters:
Returns:
handleChanges
public ChangeFeedEncryptionProcessorBuilder handleChanges(Consumer> consumer)
Sets a consumer function which will be called to process changes.
Parameters:
Returns:
hostName
public ChangeFeedEncryptionProcessorBuilder hostName(String hostName)
Sets the host name.
Parameters:
Returns:
leaseContainer
public ChangeFeedEncryptionProcessorBuilder leaseContainer(CosmosAsyncContainer leaseContainer)
Sets an existing CosmosAsyncContainer to be used to read from the leases container.
Parameters:
Returns:
options
public ChangeFeedEncryptionProcessorBuilder options(ChangeFeedProcessorOptions changeFeedProcessorOptions)
Sets the 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
Parameters:
Returns:
Applies to
Azure SDK for Java