Table of Contents

Delegate Container.ChangesEstimationHandler

Namespace
Microsoft.Azure.Cosmos
Assembly
Microsoft.Azure.Cosmos.Client.dll

Delegate to receive the estimation of pending changes to be read by the associated ChangeFeedProcessor instance.

public delegate Task Container.ChangesEstimationHandler(long estimatedPendingChanges, CancellationToken cancellationToken)

Parameters

estimatedPendingChanges long

An estimation in number of transactions.

cancellationToken CancellationToken

A cancellation token representing the current cancellation status of the ChangeFeedProcessor instance.

Returns

Task

A Task representing the asynchronous operation that is going to be done with the estimation.

Extension Methods

Remarks

The estimation over the Change Feed identifies volumes of transactions. If operations in the container are performed through stored procedures, transactional batch or bulk, a group of operations may share the same transaction scope and represented by a single transaction. In those cases, the estimation might not exactly represent number of items, but it is still valid to understand if the pending volume is increasing, decreasing, or on a steady state.

Constructors

ChangesEstimationHandler(object, nint)

public ChangesEstimationHandler(object @object, nint method)

Parameters

object object
method nint

Methods

BeginInvoke(long, CancellationToken, AsyncCallback, object)

public virtual IAsyncResult BeginInvoke(long estimatedPendingChanges, CancellationToken cancellationToken, AsyncCallback callback, object @object)

Parameters

estimatedPendingChanges long
cancellationToken CancellationToken
callback AsyncCallback
object object

Returns

IAsyncResult

EndInvoke(IAsyncResult)

public virtual Task EndInvoke(IAsyncResult result)

Parameters

result IAsyncResult

Returns

Task

Invoke(long, CancellationToken)

public virtual Task Invoke(long estimatedPendingChanges, CancellationToken cancellationToken)

Parameters

estimatedPendingChanges long
cancellationToken CancellationToken

Returns

Task