NCBI C++ ToolKit
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members

Search Toolkit Book for CWorkerNodeJobContext

Worker Node job context. More...

#include <connect/services/grid_worker.hpp>

+ Collaboration diagram for CWorkerNodeJobContext:

Public Types

enum  ECommitStatus {
  eCS_Done , eCS_Failure , eCS_Return , eCS_Reschedule ,
  eCS_NotCommitted , eCS_JobIsLost
typedef SWorkerNodeJobContextImplTInstance

Public Member Functions

 CWorkerNodeJobContext (EVoid)
 CWorkerNodeJobContext (SWorkerNodeJobContextImpl *impl)
CWorkerNodeJobContextoperator= (SWorkerNodeJobContextImpl *impl)
 operator SWorkerNodeJobContextImpl * ()
 operator const SWorkerNodeJobContextImpl * () const
SWorkerNodeJobContextImploperator-- (int)
const SWorkerNodeJobContextImploperator-- (int) const
SWorkerNodeJobContextImploperator-> ()
const SWorkerNodeJobContextImploperator-> () const
 CWorkerNodeJobContext ()
const CNetScheduleJobGetJob () const
 Get the associated job structure to access all of its fields. More...
CNetScheduleJobGetJob ()
const stringGetJobKey () const
 Get a job key. More...
const stringGetJobInput () const
 Get a job input string. More...
void SetJobOutput (const string &output)
 Set a job's output. More...
void SetJobRetCode (int ret_code)
 Set the return code of the job. More...
CNcbiIstreamGetIStream ()
 Get a stream with input data for a job. More...
size_t GetInputBlobSize () const
 Get the size of an input stream. More...
void PutProgressMessage (const string &msg, bool send_immediately=false, bool overwrite=true)
 Put progress message. More...
CNcbiOstreamGetOStream ()
 Get a stream where a job can write its result. More...
void CloseStreams ()
void CommitJob ()
 Confirm that a job is done and result is ready to be sent back to the client. More...
void CommitJobWithFailure (const string &err_msg, bool no_retries=false)
 Confirm that a job is finished, but an error has happened during its execution. More...
void ReturnJob ()
 Schedule the job for return. More...
void RescheduleJob (const string &affinity, const string &group=kEmptyStr)
 Put the job back in the queue with the specified affinity and group. More...
CNetScheduleAdmin::EShutdownLevel GetShutdownLevel ()
 Check if job processing must be aborted. More...
const stringGetQueueName () const
 Get a name of a queue where this node is connected to. More...
const stringGetClientName () const
 Get a node name. More...
void JobDelayExpiration (unsigned runtime_inc)
 Increment job execution timeout. More...
bool IsLogRequested () const
 Check if logging was requested in config file. More...
void RequestExclusiveMode ()
 Instruct the system that this job requires all system's resources If this method is call, the node will not accept any other jobs until this one is done. More...
const stringGetJobOutput () const
CNetScheduleAPI::TJobMask GetJobMask () const
unsigned int GetJobNumber () const
bool IsJobCommitted () const
ECommitStatus GetCommitStatus () const
bool IsJobLost () const
IWorkerNodeCleanupEventSourceGetCleanupEventSource ()
CGridWorkerNode GetWorkerNode () const

Static Public Member Functions

static const char * GetCommitStatusDescription (ECommitStatus commit_status)

Protected Attributes

CNetRef< SWorkerNodeJobContextImplm_Impl

Detailed Description

Worker Node job context.

Context in which a job is running, gives access to input and output storage and some job control parameters.

See also

Definition at line 195 of file grid_worker.hpp.

The documentation for this class was generated from the following files:
Modified on Mon Feb 26 04:03:30 2024 by rev. 669887