WRENCH  1.10
Cyberinfrastructure Simulation Workbench
Overview Installation Getting Started WRENCH 101 WRENCH 102
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
wrench::WorkflowJob Class Reference

Abstraction of a job used for executing tasks in a Workflow. More...

#include <WorkflowJob.h>

Inheritance diagram for wrench::WorkflowJob:
wrench::PilotJob wrench::StandardJob

Public Member Functions

virtual ~WorkflowJob ()
 Destructor.
 
std::string getCallbackMailbox ()
 Get the "next" callback mailbox (returns the origin (i.e., workflow) mailbox if the mailbox stack is empty) More...
 
double getEndDate ()
 Get the date at which the job ended (<0 means "never submitted") More...
 
std::string getName ()
 Get the job's name. More...
 
std::string getOriginCallbackMailbox ()
 Get the "origin" callback mailbox. More...
 
std::shared_ptr< ComputeServicegetParentComputeService ()
 Get the parent compute service of the job. More...
 
virtual unsigned long getPriority ()
 Return default job priority as zero. More...
 
std::map< std::string, std::string > getServiceSpecificArguments ()
 Return the service-specific arguments that were used during job submission. More...
 
double getSubmitDate ()
 Get the date at which the job was last submitted (<0 means "never submitted") More...
 
std::string popCallbackMailbox ()
 Get the "next" callback mailbox (returns the workflow mailbox if the mailbox stack is empty), and pops it. More...
 
void pushCallbackMailbox (std::string)
 Pushes a callback mailbox. More...
 
void setParentComputeService (std::shared_ptr< ComputeService > compute_service)
 Set the parent compute service of the job. More...
 

Protected Member Functions

 WorkflowJob ()
 Constructor. More...
 
unsigned long getNewUniqueNumber ()
 Generate a unique number (for each newly generated job) More...
 

Protected Attributes

std::stack< std::string > callback_mailbox_stack
 Stack of callback mailboxes (to pop notifications)
 
double end_date
 The date at which the job ended (with success or failure)
 
std::string name
 The job's name.
 
std::shared_ptr< ComputeServiceparent_compute_service
 The compute service to which the job was submitted.
 
std::map< std::string, std::string > service_specific_args
 Service-specific arguments used during job submission.
 
double submit_date
 The date at which the job was last submitted.
 
Workflowworkflow
 The workflow this job belong to.
 

Detailed Description

Abstraction of a job used for executing tasks in a Workflow.

Constructor & Destructor Documentation

◆ WorkflowJob()

wrench::WorkflowJob::WorkflowJob ( )
protected

Constructor.

Parameters
typejob type

Member Function Documentation

◆ getCallbackMailbox()

std::string wrench::WorkflowJob::getCallbackMailbox ( )

Get the "next" callback mailbox (returns the origin (i.e., workflow) mailbox if the mailbox stack is empty)

Returns
the next callback mailbox

◆ getEndDate()

double wrench::WorkflowJob::getEndDate ( )

Get the date at which the job ended (<0 means "never submitted")

Returns
the end date

◆ getName()

std::string wrench::WorkflowJob::getName ( )

Get the job's name.

Returns
the name as a string

◆ getNewUniqueNumber()

unsigned long wrench::WorkflowJob::getNewUniqueNumber ( )
protected

Generate a unique number (for each newly generated job)

Returns
a unique number

◆ getOriginCallbackMailbox()

std::string wrench::WorkflowJob::getOriginCallbackMailbox ( )

Get the "origin" callback mailbox.

Returns
the next callback mailbox

◆ getParentComputeService()

std::shared_ptr< ComputeService > wrench::WorkflowJob::getParentComputeService ( )

Get the parent compute service of the job.

Returns
a compute service

◆ getPriority()

unsigned long wrench::WorkflowJob::getPriority ( )
virtual

Return default job priority as zero.

Returns
priority as zero

Reimplemented in wrench::StandardJob, and wrench::PilotJob.

◆ getServiceSpecificArguments()

std::map< std::string, std::string > wrench::WorkflowJob::getServiceSpecificArguments ( )

Return the service-specific arguments that were used during job submission.

Returns
a map of argument name/values

◆ getSubmitDate()

double wrench::WorkflowJob::getSubmitDate ( )

Get the date at which the job was last submitted (<0 means "never submitted")

Returns
the submit date

◆ popCallbackMailbox()

std::string wrench::WorkflowJob::popCallbackMailbox ( )

Get the "next" callback mailbox (returns the workflow mailbox if the mailbox stack is empty), and pops it.

Returns
the next callback mailbox

◆ pushCallbackMailbox()

void wrench::WorkflowJob::pushCallbackMailbox ( std::string  mailbox)

Pushes a callback mailbox.

Parameters
mailboxthe mailbox name

◆ setParentComputeService()

void wrench::WorkflowJob::setParentComputeService ( std::shared_ptr< ComputeService compute_service)

Set the parent compute service of the job.

Parameters
compute_servicea compute service

The documentation for this class was generated from the following files: