Show / Hide Table of Contents

Class JobOrchestratorBase

Base class for job orchestrators.

Inheritance
System.Object
JobOrchestratorBase
FlowGraphOrchestrator
Implements
IJobOrchestrator
Namespace: DNVGL.One.Compute.Scheduling.Scheduler
Assembly: DNVGL.One.Compute.Scheduling.dll
Syntax
public abstract class JobOrchestratorBase : object, IJobOrchestrator

Constructors

View Source

JobOrchestratorBase(IJobEventPublisher, ILogger, IWorkScheduler, IWorkItemStatusService, IJobStatusService, IFlowModelStorageService<WorkItem>)

Initializes a new instance of the JobOrchestratorBase class.

Declaration
protected JobOrchestratorBase(IJobEventPublisher eventPublisher, ILogger logger, IWorkScheduler scheduler, IWorkItemStatusService taskStatusService, IJobStatusService jobStatusService, IFlowModelStorageService<WorkItem> workItemStorageService)
Parameters
Type Name Description
IJobEventPublisher eventPublisher

The monitor.

ILogger logger

The logger.

IWorkScheduler scheduler

The scheduler.

IWorkItemStatusService taskStatusService

The task status service.

IJobStatusService jobStatusService

The job status service.

IFlowModelStorageService<WorkItem> workItemStorageService

The work item storage service.

Properties

View Source

CancellationToken

Gets the cancellation token.

Declaration
protected CancellationToken CancellationToken { get; }
Property Value
Type Description
CancellationToken

The cancellation token.

View Source

JobEventPublisher

Gets the job event publisher.

Declaration
protected IJobEventPublisher JobEventPublisher { get; }
Property Value
Type Description
IJobEventPublisher

The job event publisher.

View Source

JobStatusService

Gets the job status service.

Declaration
protected IJobStatusService JobStatusService { get; }
Property Value
Type Description
IJobStatusService

The job status service.

View Source

Logger

Gets the logger.

Declaration
protected ILogger Logger { get; }
Property Value
Type Description
ILogger

The logger.

View Source

TaskMonitoringInterval

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

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

The task status monitoring interval (in seconds).

View Source

WorkItemStatusService

Gets the work item status service.

Declaration
protected IWorkItemStatusService WorkItemStatusService { get; }
Property Value
Type Description
IWorkItemStatusService

The work item status service.

View Source

WorkItemStorageService

Gets the work item storage service.

Declaration
protected IFlowModelStorageService<WorkItem> WorkItemStorageService { get; }
Property Value
Type Description
IFlowModelStorageService<WorkItem>

The work item storage service.

View Source

WorkScheduler

Gets the work scheduler.

Declaration
protected IWorkScheduler WorkScheduler { get; }
Property Value
Type Description
IWorkScheduler

The work scheduler.

Methods

View Source

CancelWork(String)

Cancels ongoing work for the specified job.

Declaration
public void CancelWork(string jobId)
Parameters
Type Name Description
System.String jobId

The job identifier to cancel.

View Source

FinalizeJob(Job, WorkStatus, String)

Finalizes the job.

Declaration
protected void FinalizeJob(Job job, WorkStatus state, string message)
Parameters
Type Name Description
Job job

The job.

WorkStatus state

The state.

System.String message

The message.

View Source

InitializeJob(Job)

Initializes the job.

Declaration
protected void InitializeJob(Job job)
Parameters
Type Name Description
Job job

The job.

View Source

IsCancelled()

Determines whether work is cancelled.

Declaration
protected bool IsCancelled()
Returns
Type Description
System.Boolean

true if work has been cancelled; otherwise, false.

View Source

LogActivity(String, String, String, String, String, String, DateTime, Boolean)

Logs the activity.

Declaration
protected void LogActivity(string sender, string eventName, string jobId, string groupId, string taskId, string nodeInfo, DateTime timestamp, bool isDetailed = false)
Parameters
Type Name Description
System.String sender

The sender.

System.String eventName

Name of the event.

System.String jobId

The job identifier.

System.String groupId

The group identifier.

System.String taskId

The task identifier.

System.String nodeInfo

The node information.

DateTime timestamp

The timestamp.

System.Boolean isDetailed

if set to true, this log entry should be treated as details.

Remarks

The isDetailed flag allows a logger to filter out details from the log and only log the essential information.

View Source

Work(Job)

Orchestrate the job.

Declaration
public abstract void Work(Job job)
Parameters
Type Name Description
Job job

The job.

Implements

IJobOrchestrator

See Also

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