Skip to content

IDurableJobFeatureHandler Methods

Handles a framework-owned durable job for a grain activation.

CanHandle(string)

abstract
public abstract bool CanHandle(string jobName)
Determines whether this handler handles the supplied durable job.

Parameters

jobNamestring
The durable job name.

Returns

true when this handler handles the job name; otherwise, false.

ExecuteJobAsync(IJobRunContext, CancellationToken)

abstract
public abstract ValueTask<DurableJobRunResult> ExecuteJobAsync(IJobRunContext context, CancellationToken attemptCancellationToken)
Executes a durable job and returns its explicit disposition.

Parameters

contextIJobRunContext
The durable job execution context.
attemptCancellationTokenCancellationToken
A token which cooperatively requests cancellation of the current execution attempt. The durable job remains eligible for another attempt.

Returns

The completed, polling, or failed disposition.