Interface IComputeJob<TArg, TResult>
Ignite compute job interface.
To define a compute job, implement this interface and deploy the binaries to the cluster with the Deployment API.public interface IComputeJob<TArg, TResult>
Type Parameters
TArg
Argument type.
TResult
Result type.
Properties
InputMarshaller
Gets the custom marshaller for the job input argument.
IMarshaller<TArg>? InputMarshaller { get; }
Property Value
- IMarshaller<TArg>
ResultMarshaller
Gets the custom marshaller for the job result.
IMarshaller<TResult>? ResultMarshaller { get; }
Property Value
- IMarshaller<TResult>
Methods
ExecuteAsync(IJobExecutionContext, TArg, CancellationToken)
Executes the job.
ValueTask<TResult> ExecuteAsync(IJobExecutionContext context, TArg arg, CancellationToken cancellationToken)
Parameters
context
IJobExecutionContextJob execution context.
arg
TArgJob argument.
cancellationToken
CancellationTokenCancellation token.
Returns
- ValueTask<TResult>
Job result.