你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

ChangeFeedProcessorBuilder.WithLeaseConfiguration 方法

定义

设置此 实例 ChangeFeedProcessor 使用的自定义配置,以在使用 时 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

参数

acquireInterval
Nullable<TimeSpan>

启动任务以验证租约是否在已知主机实例之间均匀分布的时间间隔。

expirationInterval
Nullable<TimeSpan>

获取租约的间隔。 如果未在此间隔内续订租约,则会导致租约过期,租约的所有权将转移到另一个处理器实例。

renewInterval
Nullable<TimeSpan>

特定处理器实例当前持有的所有租约的续订间隔。

返回

要使用的 实例 ChangeFeedProcessorBuilder

适用于