DurableTask
class
Namespace: Orleans.Durable.Tasks
Defines a deferred, host-scheduled durable asynchronous operation.
[Orleans.Alias(Orleans.Durable.Tasks.DurableTask)]public abstract class DurableTaskConstructors
Properties
CurrentGets the context of the durable task which the calling code runs in.
Methods
Delay(TimeSpan)Creates a durable delay measured using host logical time.DelayUntil(DateTimeOffset)Creates a durable delay which completes atdueTime, measured using host logical time.FromResult(TResult)Creates a successfully completed durable task.GetVersion(string, int, int)Returns the version of the changenamewhich the running durable task follows, so code which changes a workflow keeps replaying the executions which started before the change.Race(IEnumerable<DurableTask<TResult>>)Creates a durable task which returns the input index and result of the first input task to complete, after requesting cancellation of every other input and waiting until each is terminal.Race(IReadOnlyList<DurableTask<TResult>>)Creates a durable task which returns the input index and result of the first input task to complete, after requesting cancellation of every other input and waiting until each is terminal.Race(IEnumerable<DurableTask>)Creates a durable task which returns the input index of the first input task to complete, after requesting cancellation of every other input and waiting until each is terminal.Race(IReadOnlyList<DurableTask>)Creates a durable task which returns the input index of the first input task to complete, after requesting cancellation of every other input and waiting until each is terminal.Run(Action<CancellationToken>)Creates an unstarted step which runsactionas a child execution when it is awaited, scheduled, or posted.Run(Func<CancellationToken, DurableTask>)Rejects a delegate which returns a durable task, which runs as a durable child when it is awaited.Run(Func<CancellationToken, Task>)Creates an unstarted step which runs asynchronousfunctionas a child execution when it is awaited, scheduled, or posted.Run(Func<DurableTask>)Rejects a delegate which returns a durable task, which runs as a durable child when it is awaited.Run(Func<Task>)Creates an unstarted step which runs asynchronousfunctionas a child execution when it is awaited, scheduled, or posted.Run(Func<ValueTask>)Creates an unstarted step which runs asynchronousfunctionas a child execution when it is awaited, scheduled, or posted.Run(Action<TState, CancellationToken>, TState)Creates a durable task which invokesactionwith capturedstate.Run(Func<TState, CancellationToken, Task>, TState)Creates a durable task which invokes asynchronousfunctionwith capturedstate.Run(Func<CancellationToken, DurableTask<TResult>>)Rejects a delegate which returns a durable task, which runs as a durable child when it is awaited.Run(Func<CancellationToken, TResult>)Creates an unstarted step which runsfunctionas a child execution when it is awaited, scheduled, or posted.Run(Func<CancellationToken, Task<TResult>>)Creates an unstarted step which runs asynchronousfunctionas a child execution when it is awaited, scheduled, or posted.Run(Func<DurableTask<TResult>>)Rejects a delegate which returns a durable task, which runs as a durable child when it is awaited.Run(Func<Task<TResult>>)Creates an unstarted step. It runsfunctionwhen it is awaited, scheduled, or posted, possibly in a later turn, as a child execution with its ownDurableTaskand cancellation scope. UnlikeSystem.Threading.Tasks.Task.Run, creating it starts nothing, and nothing runs on the thread pool.Run(Func<ValueTask<TResult>>)Creates an unstarted step which runs asynchronousfunctionas a child execution when it is awaited, scheduled, or posted.Run(Func<TState, CancellationToken, TResult>, TState)Creates a durable task which invokesfunctionwith capturedstate.Run(Func<TState, CancellationToken, Task<TResult>>, TState)Creates a durable task which invokes asynchronousfunctionwith capturedstate.RunAsync(DurableTaskContext)Runs the definition in the supplied execution context.RunInline(Func<DurableTask<TResult>>)Rejects a durable task effect, which runs as a durable child when it is awaited.RunInline(Func<TResult>)Runseffectin the caller's current work item before returning, and records its outcome, which every later run of the task's body returns without runningeffectagain.RunInline(Func<Task<TResult>>)Rejects an asynchronous effect, whichDurableTask.RunInlinecan't record.RunInline(Func<ValueTask<TResult>>)Rejects an asynchronous effect, whichDurableTask.RunInlinecan't record.RunInline(string, Func<DurableTask<TResult>>)Rejects a durable task effect, which runs as a durable child when it is awaited.RunInline(string, Func<TResult>)Runseffectin the caller's current work item before returning, with no suspension and no child execution, and records its outcome in the same journal write as the journaled state which it changes. A replay returns the recorded outcome without runningeffect.RunInline(string, Func<Task<TResult>>)Rejects an asynchronous effect, whichDurableTask.RunInlinecan't record.RunInline(string, Func<ValueTask<TResult>>)Rejects an asynchronous effect, whichDurableTask.RunInlinecan't record.RunInline(Action)Runseffectin the caller's current work item before returning, and records its outcome; later runs of the task's body don't run it again.RunInline(Func<DurableTask>)Rejects a durable task effect, which runs as a durable child when it is awaited.RunInline(Func<Task>)Rejects an asynchronous effect, whichDurableTask.RunInlinecan't record.RunInline(Func<ValueTask>)Rejects an asynchronous effect, whichDurableTask.RunInlinecan't record.RunInline(string, Action)Runseffectin the caller's current work item before returning, and records its outcome; later runs of the task's body don't run it again.RunInline(string, Func<DurableTask>)Rejects a durable task effect, which runs as a durable child when it is awaited.RunInline(string, Func<Task>)Rejects an asynchronous effect, whichDurableTask.RunInlinecan't record.RunInline(string, Func<ValueTask>)Rejects an asynchronous effect, whichDurableTask.RunInlinecan't record.ScheduleAll(IEnumerable<DurableTask<TResult>>)Creates a durable task which schedules every input task and returns their handles, in input order.ScheduleAll(IReadOnlyList<DurableTask<TResult>>)Creates a durable task which schedules every input task and returns their handles, in input order.ScheduleAll(IEnumerable<DurableTask>)Creates a durable task which schedules every input task and returns their handles, in input order.ScheduleAll(IReadOnlyList<DurableTask>)Creates a durable task which schedules every input task and returns their handles, in input order.WhenAll(IEnumerable<DurableTask>)Creates a durable task which completes once every input task has completed.WhenAll(IReadOnlyList<DurableTask>)Creates a durable task which completes once every input task has completed.WhenAll(IEnumerable<DurableTask<TResult>>)Creates a durable task which returns the results of every input task, in input order.WhenAll(IReadOnlyList<DurableTask<TResult>>)Creates a durable task which returns the results of every input task, in input order.WhenAllCompleted(IEnumerable<DurableTask<TResult>>)Creates a durable task which schedules every input task, waits until each is terminal, and returns their handles, in input order.WhenAllCompleted(IReadOnlyList<DurableTask<TResult>>)Creates a durable task which schedules every input task, waits until each is terminal, and returns their handles, in input order.WhenAllCompleted(IEnumerable<DurableTask>)Creates a durable task which schedules every input task, waits until each is terminal, and returns their handles, in input order.WhenAllCompleted(IReadOnlyList<DurableTask>)Creates a durable task which schedules every input task, waits until each is terminal, and returns their handles, in input order.WhenAny(IEnumerable<DurableTask<TResult>>)Creates a durable task which returns the input index and result of the first input task to complete.WhenAny(IReadOnlyList<DurableTask<TResult>>)Creates a durable task which returns the input index and result of the first input task to complete.WhenAny(IEnumerable<DurableTask>)Creates a durable task which returns the input index of the first input task to complete.WhenAny(IReadOnlyList<DurableTask>)Creates a durable task which returns the input index of the first input task to complete.WhenEach(IEnumerable<DurableTask<TResult>>)Schedules every input task and yields each input's handle once, in completion order, as the input reaches a terminal state.WhenEach(IReadOnlyList<DurableTask<TResult>>)Schedules every input task and yields each input's handle once, in completion order, as the input reaches a terminal state.WhenEach(IEnumerable<DurableTask>)Schedules every input task and yields each input's handle once, in completion order, as the input reaches a terminal state.WhenEach(IReadOnlyList<DurableTask>)Schedules every input task and yields each input's handle once, in completion order, as the input reaches a terminal state.
