Table of Contents

Struct InvocationHandle

Namespace
Restate.Sdk
Assembly
Restate.Sdk.dll

A handle to a running invocation, returned by send operations. Carries the invocation id, and addresses signals on that invocation.

public readonly record struct InvocationHandle : IEquatable<InvocationHandle>
Implements
Inherited Members

Constructors

InvocationHandle(string)

A handle to a running invocation, returned by send operations. Carries the invocation id, and addresses signals on that invocation.

public InvocationHandle(string InvocationId)

Parameters

InvocationId string

Properties

InvocationId

public string InvocationId { get; init; }

Property Value

string

Methods

RejectSignal(Context, string, string)

Rejects a named signal on this invocation: the handler awaiting it fails with a TerminalException carrying reason.

public ValueTask RejectSignal(Context context, string name, string reason)

Parameters

context Context

The context of the handler sending the signal.

name string

The signal name the target handler awaits.

reason string

The rejection reason the awaiting handler sees.

Returns

ValueTask

RejectSignal(IContext, int, string)

Rejects an unnamed signal on this invocation, addressed by the index the awaiting handler allocated — Index.

public ValueTask RejectSignal(IContext context, int signalIndex, string reason)

Parameters

context IContext

The context of the handler sending the signal.

signalIndex int

The signal index the target handler awaits.

reason string

The rejection reason the awaiting handler sees.

Returns

ValueTask

RejectSignal(IContext, string, string)

Rejects a named signal on this invocation through any IContext: the handler awaiting it fails with a TerminalException carrying reason.

public ValueTask RejectSignal(IContext context, string name, string reason)

Parameters

context IContext

The context of the handler sending the signal.

name string

The signal name the target handler awaits.

reason string

The rejection reason the awaiting handler sees.

Returns

ValueTask

ResolveSignal<T>(Context, string, T)

Resolves a named signal on this invocation with a value. The handler being signalled receives it from its Signal<T>(string) future, whether it is already awaiting the signal or reaches it later.

public ValueTask ResolveSignal<T>(Context context, string name, T value)

Parameters

context Context

The context of the handler sending the signal.

name string

The signal name the target handler awaits.

value T

The value the signal resolves with.

Returns

ValueTask

Type Parameters

T

ResolveSignal<T>(IContext, int, T)

Resolves an unnamed signal on this invocation with a value, addressed by the index the awaiting handler allocated — Index.

public ValueTask ResolveSignal<T>(IContext context, int signalIndex, T value)

Parameters

context IContext

The context of the handler sending the signal.

signalIndex int

The signal index the target handler awaits.

value T

The value the signal resolves with.

Returns

ValueTask

Type Parameters

T

ResolveSignal<T>(IContext, string, T)

Resolves a named signal on this invocation with a value, through any IContext — so a helper written against the interface can signal an invocation without taking a dependency on Context.

public ValueTask ResolveSignal<T>(IContext context, string name, T value)

Parameters

context IContext

The context of the handler sending the signal.

name string

The signal name the target handler awaits.

value T

The value the signal resolves with.

Returns

ValueTask

Type Parameters

T