Show / Hide Table of Contents

Class JobMonitor

Job monitor.

Inheritance
System.Object
JobMonitor
Implements
IJobMonitor
Namespace: DNVGL.One.Compute.Core.PlatformClient
Assembly: DNVGL.One.Compute.Core.dll
Syntax
public class JobMonitor : object, IJobMonitor

Constructors

View Source

JobMonitor(Int32, IOneComputePlatformClient)

Initializes a new instance of the JobMonitor class.

Declaration
public JobMonitor(int pollingIntervalSeconds, IOneComputePlatformClient platformClient)
Parameters
Type Name Description
System.Int32 pollingIntervalSeconds

The polling interval seconds.

IOneComputePlatformClient platformClient

The platform client.

Properties

View Source

PollingIntervalSeconds

Gets or sets the polling interval.

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

The polling interval in seconds.

Methods

View Source

AwaitJobTerminationAsync(CancellationToken)

Awaits job termination.

Declaration
public async Task<WorkStatus> AwaitJobTerminationAsync(CancellationToken cancellationToken = null)
Parameters
Type Name Description
CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
Task<WorkStatus>

Terminal job status.

View Source

BeginMonitorJob(String, CancellationToken)

Monitors the job.

Declaration
public async void BeginMonitorJob(string jobId, CancellationToken cancellationToken)
Parameters
Type Name Description
System.String jobId

The job identifier.

CancellationToken cancellationToken

The cancellation token.

Events

View Source

JobProgressChanged

Occurs when a Job changes progress.

Declaration
public event EventHandler<JobEventArgs> JobProgressChanged
Event Type
Type Description
EventHandler<JobEventArgs>
View Source

JobStatusChanged

Occurs when a Job changes status.

Declaration
public event EventHandler<JobEventArgs> JobStatusChanged
Event Type
Type Description
EventHandler<JobEventArgs>
View Source

WorkItemProgressChanged

Occurs when a WorkItem changes progress.

Declaration
public event EventHandler<WorkItemEventArgs> WorkItemProgressChanged
Event Type
Type Description
EventHandler<WorkItemEventArgs>
View Source

WorkItemStatusChanged

Occurs when a WorkItem changes status.

Declaration
public event EventHandler<WorkItemEventArgs> WorkItemStatusChanged
Event Type
Type Description
EventHandler<WorkItemEventArgs>

Implements

IJobMonitor

See Also

IJobMonitor
  • View Source
In This Article
Back to top Copyright © DNV AS. All rights reserved.