Class JobMonitor
Job monitor.
Inheritance
System.Object
JobMonitor
Implements
Namespace: DNVGL.One.Compute.Core.PlatformClient
Assembly: DNVGL.One.Compute.Core.dll
Syntax
public class JobMonitor : object, IJobMonitor
Constructors
View SourceJobMonitor(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 SourcePollingIntervalSeconds
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 SourceAwaitJobTerminationAsync(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. |
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 SourceJobProgressChanged
Occurs when a Job changes progress.
Declaration
public event EventHandler<JobEventArgs> JobProgressChanged
Event Type
| Type | Description |
|---|---|
| EventHandler<JobEventArgs> |
JobStatusChanged
Occurs when a Job changes status.
Declaration
public event EventHandler<JobEventArgs> JobStatusChanged
Event Type
| Type | Description |
|---|---|
| EventHandler<JobEventArgs> |
WorkItemProgressChanged
Occurs when a WorkItem changes progress.
Declaration
public event EventHandler<WorkItemEventArgs> WorkItemProgressChanged
Event Type
| Type | Description |
|---|---|
| EventHandler<WorkItemEventArgs> |
WorkItemStatusChanged
Occurs when a WorkItem changes status.
Declaration
public event EventHandler<WorkItemEventArgs> WorkItemStatusChanged
Event Type
| Type | Description |
|---|---|
| EventHandler<WorkItemEventArgs> |