Show / Hide Table of Contents

Class JobScheduler

Compute job scheduler.

Inheritance
System.Object
JobScheduler
Implements
IJobScheduler
IDisposable
Namespace: DNVGL.One.Compute.Scheduling.Scheduler
Assembly: DNVGL.One.Compute.Scheduling.dll
Syntax
public class JobScheduler : object, IJobScheduler, IDisposable

Constructors

View Source

JobScheduler(ILogger, IWorkScheduler, IWorkItemStatusService, IJobStatusService, IFlowModelStorageService<WorkItem>)

Initializes a new instance of the JobScheduler class.

Declaration
public JobScheduler(ILogger logger, IWorkScheduler workScheduler, IWorkItemStatusService taskStatusService, IJobStatusService jobStatusService, IFlowModelStorageService<WorkItem> workItemStorageService = null)
Parameters
Type Name Description
ILogger logger

The logger.

IWorkScheduler workScheduler

The scheduler.

IWorkItemStatusService taskStatusService

The task status service.

IJobStatusService jobStatusService

The job status service.

IFlowModelStorageService<WorkItem> workItemStorageService

The work item storage service.

View Source

JobScheduler(OrchestrationEnvironment)

Initializes a new instance of the JobScheduler class.

Declaration
public JobScheduler(OrchestrationEnvironment orchestrationEnvironment)
Parameters
Type Name Description
OrchestrationEnvironment orchestrationEnvironment

The orchestration environment.

Properties

View Source

MaxNumberOfConcurrentJobs

Gets or sets the maximum number of concurrent jobs.

Declaration
public int MaxNumberOfConcurrentJobs { get; set; }
Property Value
Type Description
System.Int32
View Source

TaskMonitoringInterval

Gets or sets the task monitoring interval (in seconds).

Declaration
public int TaskMonitoringInterval { get; set; }
Property Value
Type Description
System.Int32

The monitor interval (in seconds).

View Source

UserIdValidator

Gets or sets the IIdValidator used for user id validation. If the UserId of the submitted job does not satisfy the Validate(String) method of the validator, the job will not be submitted.

Declaration
public IIdValidator UserIdValidator { get; set; }
Property Value
Type Description
IIdValidator

The user identifier validator.

Remarks

By default, the EmailAddressValidator is used.

Methods

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
public Task<IJobMonitor> BeginMonitorJobAsync(string jobId)
Parameters
Type Name Description
System.String jobId

The job identifier.

Returns
Type Description
Task<IJobMonitor>

Asynchronous .

Remarks

The returned task ends when observation has been set up.

View Source

CancelJobAsync(String)

Cancels the job.

Declaration
public Task CancelJobAsync(string jobId)
Parameters
Type Name Description
System.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

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
public void Dispose()
View Source

EndMonitorJobAsync(String)

End monitoring the specified Job.

Declaration
public Task EndMonitorJobAsync(string jobId)
Parameters
Type Name Description
System.String jobId

The job identifier.

Returns
Type Description
Task

Asynchronous .

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
public Task<IJobMonitor> SubmitJobAsync(Job job)
Parameters
Type Name Description
Job job

The job.

Returns
Type Description
Task<IJobMonitor>

A job monitor.

Implements

IJobScheduler
IDisposable

See Also

IJobScheduler
  • View Source
Back to top Copyright © DNV GL AS. All rights reserved.