Interface IJobExecutionContext
Compute job execution context. See ExecuteAsync(IJobExecutionContext, TArg, CancellationToken).
public interface IJobExecutionContext
Properties
Ignite
Gets the Ignite API entry point.
IIgnite Ignite { get; }
Property Value
LoggerFactory
Gets the logger factory backed by the server node log.
Messages are forwarded to the Ignite node executing this job and written under the category name passed to CreateLogger(string), so per-category level filtering is controlled by the server's logging configuration (IsEnabled(LogLevel) reflects the server-side levels). BeginScope<TState>(TState) is supported; the active scope is prepended to each message.
public sealed class MyJob : IComputeJob<string, string>
{
public ValueTask<string> ExecuteAsync(IJobExecutionContext context, string arg, CancellationToken ct)
{
ILogger logger = context.LoggerFactory.CreateLogger<MyJob>();
logger.LogInformation("Processing {Arg}", arg);
return ValueTask.FromResult(arg.ToUpperInvariant());
}
}
ILoggerFactory LoggerFactory { get; }