Share via


ChangeFeedProcessorBuilder.WithLeaseConfiguration Method

Definition

Sets a custom configuration to be used by this instance of ChangeFeedProcessor to control how leases are maintained in a container when using WithLeaseContainer(Container).

public Microsoft.Azure.Cosmos.ChangeFeedProcessorBuilder WithLeaseConfiguration (TimeSpan? acquireInterval = default, TimeSpan? expirationInterval = default, TimeSpan? renewInterval = default);
member this.WithLeaseConfiguration : Nullable<TimeSpan> * Nullable<TimeSpan> * Nullable<TimeSpan> -> Microsoft.Azure.Cosmos.ChangeFeedProcessorBuilder
Public Function WithLeaseConfiguration (Optional acquireInterval As Nullable(Of TimeSpan) = Nothing, Optional expirationInterval As Nullable(Of TimeSpan) = Nothing, Optional renewInterval As Nullable(Of TimeSpan) = Nothing) As ChangeFeedProcessorBuilder

Parameters

acquireInterval
Nullable<TimeSpan>

Interval to kick off a task to verify if leases are distributed evenly among known host instances.

expirationInterval
Nullable<TimeSpan>

Interval for which the lease is taken. If the lease is not renewed within this interval, it will cause it to expire and ownership of the lease will move to another processor instance.

renewInterval
Nullable<TimeSpan>

Renew interval for all leases currently held by a particular processor instance.

Returns

The instance of ChangeFeedProcessorBuilder to use.

Applies to