NCBI C++ ToolKit
|
Search Toolkit Book for CWorkerNodeJobContext
Worker Node job context. More...
#include <connect/services/grid_worker.hpp>
Public Types | |
enum | ECommitStatus { eCS_Done , eCS_Failure , eCS_Return , eCS_Reschedule , eCS_NotCommitted , eCS_JobIsLost } |
typedef SWorkerNodeJobContextImpl * | TInstance |
Public Member Functions | |
CWorkerNodeJobContext (EVoid) | |
CWorkerNodeJobContext (SWorkerNodeJobContextImpl *impl) | |
CWorkerNodeJobContext & | operator= (SWorkerNodeJobContextImpl *impl) |
operator SWorkerNodeJobContextImpl * () | |
operator const SWorkerNodeJobContextImpl * () const | |
SWorkerNodeJobContextImpl & | operator-- (int) |
const SWorkerNodeJobContextImpl & | operator-- (int) const |
SWorkerNodeJobContextImpl * | operator-> () |
const SWorkerNodeJobContextImpl * | operator-> () const |
CWorkerNodeJobContext () | |
const CNetScheduleJob & | GetJob () const |
Get the associated job structure to access all of its fields. More... | |
CNetScheduleJob & | GetJob () |
const string & | GetJobKey () const |
Get a job key. More... | |
const string & | GetJobInput () 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... | |
CNcbiIstream & | GetIStream () |
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... | |
CNcbiOstream & | GetOStream () |
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 string & | GetQueueName () const |
Get a name of a queue where this node is connected to. More... | |
const string & | GetClientName () 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 string & | GetJobOutput () const |
CNetScheduleAPI::TJobMask | GetJobMask () const |
unsigned int | GetJobNumber () const |
bool | IsJobCommitted () const |
ECommitStatus | GetCommitStatus () const |
bool | IsJobLost () const |
IWorkerNodeCleanupEventSource * | GetCleanupEventSource () |
CGridWorkerNode | GetWorkerNode () const |
Static Public Member Functions | |
static const char * | GetCommitStatusDescription (ECommitStatus commit_status) |
Protected Attributes | |
CNetRef< SWorkerNodeJobContextImpl > | m_Impl |
Worker Node job context.
Context in which a job is running, gives access to input and output storage and some job control parameters.
Definition at line 195 of file grid_worker.hpp.