Show / Hide Table of Contents

Interface IJobScheduler

Represents a One Compute job scheduler.

Namespace: DNVGL.One.Compute.Core.Scheduling
Assembly: DNVGL.One.Compute.Core.dll
Syntax
public interface IJobScheduler

Methods

View Source

AddWorkToJobAsync(string, WorkItem)

Add work to job.

Declaration
Task AddWorkToJobAsync(string jobId, WorkItem work)
Parameters
Type Name Description
string jobId

The job identifier.

WorkItem work

The work to be added.

Returns
Type Description
Task

Asynchronous Task.

View Source

BeginMonitorJobAsync(string)

Begin monitoring the specified Job. Any job and work item event for this job will be pushed through the event handlers on the returned IJobMonitor.

Declaration
Task<IJobMonitor> BeginMonitorJobAsync(string jobId)
Parameters
Type Name Description
string jobId

The job identifier.

Returns
Type Description
Task<IJobMonitor>

Asynchronous Task.

Remarks

The returned task ends when observation has been set up.

View Source

CancelJobAsync(string)

Cancels the job.

Declaration
Task CancelJobAsync(string jobId)
Parameters
Type Name Description
string jobId

The job identifier.

Returns
Type Description
Task

Cancellation task.

Remarks

The returned task ends when the job has been cancelled with the backend services.

View Source

EndMonitorJobAsync(string)

End monitoring the specified Job.

Declaration
Task EndMonitorJobAsync(string jobId)
Parameters
Type Name Description
string jobId

The job identifier.

Returns
Type Description
Task

Asynchronous Task.

View Source

SubmitJobAsync(Job)

Submits the specified Job and returns a job monitor that allows the client to monitor the status and progress of the job. Any job and work item event for this job will be pushed through the event handlers on the returned IJobMonitor.

Declaration
Task<IJobMonitor> SubmitJobAsync(Job job)
Parameters
Type Name Description
Job job

The job.

Returns
Type Description
Task<IJobMonitor>

Job monitor.

Extension Methods

JobSchedulerExtensions.CancelJobAndWaitForTerminationAsync(IJobScheduler, string)
JobSchedulerExtensions.CancelJobAndWaitForTerminationAsync(IJobScheduler, string, CancellationToken)
JobSchedulerExtensions.SubmitJobAndWaitForTerminationAsync(IJobScheduler, Job)
JobSchedulerExtensions.SubmitJobAndWaitForTerminationAsync(IJobScheduler, Job, CancellationToken)
  • View Source
In this article
Back to top Copyright © DNV AS. All rights reserved.