Delegate Container.ChangeFeedStreamHandlerWithManualCheckpoint
Delegate to receive the changes within a ChangeFeedProcessor execution with manual checkpoint.
public delegate Task Container.ChangeFeedStreamHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, Stream changes, Func<Task> checkpointAsync, CancellationToken cancellationToken)
Parameters
contextChangeFeedProcessorContextThe context related to the changes.
changesStreamThe changes that happened.
checkpointAsyncFunc<Task>A task representing an asynchronous checkpoint on the progress of a lease.
cancellationTokenCancellationTokenA cancellation token representing the current cancellation status of the ChangeFeedProcessor instance.
Returns
- Extension Methods
Examples
(ChangeFeedProcessorContext context, Stream stream, Func<Task> checkpointAsync, CancellationToken cancellationToken) =>
{
// consume stream
// On certain condition, we can checkpoint
await checkpointAsync();
}
Constructors
ChangeFeedStreamHandlerWithManualCheckpoint(object, nint)
public ChangeFeedStreamHandlerWithManualCheckpoint(object @object, nint method)
Parameters
Methods
BeginInvoke(ChangeFeedProcessorContext, Stream, Func<Task>, CancellationToken, AsyncCallback, object)
public virtual IAsyncResult BeginInvoke(ChangeFeedProcessorContext context, Stream changes, Func<Task> checkpointAsync, CancellationToken cancellationToken, AsyncCallback callback, object @object)
Parameters
contextChangeFeedProcessorContextchangesStreamcheckpointAsyncFunc<Task>cancellationTokenCancellationTokencallbackAsyncCallbackobjectobject
Returns
EndInvoke(IAsyncResult)
public virtual Task EndInvoke(IAsyncResult result)
Parameters
resultIAsyncResult
Returns
Invoke(ChangeFeedProcessorContext, Stream, Func<Task>, CancellationToken)
public virtual Task Invoke(ChangeFeedProcessorContext context, Stream changes, Func<Task> checkpointAsync, CancellationToken cancellationToken)
Parameters
contextChangeFeedProcessorContextchangesStreamcheckpointAsyncFunc<Task>cancellationTokenCancellationToken