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

Search Toolkit Book for CNetScheduleAPI

Client API for NCBI NetSchedule server. More...

#include <connect/services/netschedule_api.hpp>

+ Inheritance diagram for CNetScheduleAPI:
+ Collaboration diagram for CNetScheduleAPI:

Classes

struct  SServerParams
 

Public Types

enum  EAppRegistry { eAppRegistry }
 Defines how this object must be initialized. More...
 
enum  EJobStatus {
  eJobNotFound = -1 , ePending = 0 , eRunning = 1 , eCanceled = 3 ,
  eFailed = 4 , eDone = 5 , eReading = 6 , eConfirmed = 7 ,
  eReadFailed = 8 , eDeleted = 9 , eLastStatus
}
 Job status codes. More...
 
enum  EJobMask {
  eEmptyMask = 0 , eExclusiveJob = (1 << 0) , eOutOfOrder = (1 << 1) , eForEachNode = (1 << 2) ,
  eSystemJob = (1 << 3) , eUserMask = (1 << 16)
}
 Job masks. More...
 
enum  EClientType {
  eCT_Auto , eCT_Admin , eCT_Submitter , eCT_WorkerNode ,
  eCT_Reader
}
 
enum  ENetScheduleWarningType {
  eWarnUnknown , eWarnAffinityNotFound , eWarnAffinityNotPreferred , eWarnAffinityAlreadyPreferred ,
  eWarnGroupNotFound , eWarnJobNotFound , eWarnJobAlreadyCanceled , eWarnJobAlreadyDone ,
  eWarnJobAlreadyFailed , eWarnJobPassportOnlyMatch , eWarnNoParametersChanged , eWarnConfigFileNotChanged ,
  eWarnAlertNotFound , eWarnAlertAlreadyAcknowledged , eWarnSubmitsDisabledForServer , eWarnQueueAlreadyPaused ,
  eWarnQueueNotPaused , eWarnCommandObsolete , eWarnJobNotRead
}
 
typedef SNetScheduleAPIImplTInstance
 
typedef unsigned TJobMask
 
typedef map< string, stringTQueueParams
 

Public Member Functions

 CNetScheduleAPI (EVoid)
 
 CNetScheduleAPI (SNetScheduleAPIImpl *impl)
 
CNetScheduleAPIoperator= (SNetScheduleAPIImpl *impl)
 
 operator SNetScheduleAPIImpl * ()
 
 operator const SNetScheduleAPIImpl * () const
 
SNetScheduleAPIImploperator-- (int)
 
const SNetScheduleAPIImploperator-- (int) const
 
SNetScheduleAPIImploperator-> ()
 
const SNetScheduleAPIImploperator-> () const
 
 CNetScheduleAPI ()
 
 CNetScheduleAPI (EAppRegistry use_app_reg, const string &conf_section=kEmptyStr)
 Creates an instance of CNetScheduleAPI and initializes it with parameters read from the application registry. More...
 
 CNetScheduleAPI (const IRegistry &reg, const string &conf_section=kEmptyStr)
 Constructs a CNetScheduleAPI object and initializes it with parameters read from the specified registry object. More...
 
 CNetScheduleAPI (CConfig *conf, const string &conf_section=kEmptyStr)
 Constructs a CNetScheduleAPI object and initializes it with parameters read from the specified configuration object. More...
 
 CNetScheduleAPI (const string &service_name, const string &client_name, const string &queue_name)
 Construct the client without linking it to any particular server. More...
 
void SetProgramVersion (const string &pv)
 Set program version (like: MyProgram v. More...
 
const stringGetProgramVersion () const
 Get program version string. More...
 
const stringGetQueueName () const
 Return Queue name. More...
 
CNetScheduleSubmitter GetSubmitter ()
 Create an instance of CNetScheduleSubmitter. More...
 
CNetScheduleExecutor GetExecutor ()
 Create an instance of CNetScheduleExecutor. More...
 
CNetScheduleJobReader GetJobReader (const string &group=kEmptyStr, const string &affinity=kEmptyStr)
 Create an instance of CNetScheduleJobReader. More...
 
CNetScheduleAdmin GetAdmin ()
 
CNetService GetService ()
 
const SServerParamsGetServerParams ()
 
void GetQueueParams (const string &queue_name, TQueueParams &queue_params)
 
void GetQueueParams (TQueueParams &queue_params)
 
EJobStatus GetJobDetails (CNetScheduleJob &job, time_t *job_exptime=NULL, ENetScheduleQueuePauseMode *pause_mode=NULL)
 Get job details. More...
 
void GetProgressMsg (CNetScheduleJob &job)
 Update the progress_message field of the job structure. More...
 
void SetCommunicationTimeout (const STimeout &to)
 
void SetClientNode (const string &client_node)
 
void SetClientSession (const string &client_session)
 
void SetClientType (EClientType client_type)
 

Static Public Member Functions

static string StatusToString (EJobStatus status)
 Printable status type. More...
 
static EJobStatus StringToStatus (const CTempString &status_str)
 Parse status string into enumerator value. More...
 
static ENetScheduleWarningType ExtractWarningType (string &warn_msg)
 
static const char * WarningTypeToString (ENetScheduleWarningType warning_type)
 

Protected Attributes

CNetRef< SNetScheduleAPIImplm_Impl
 

Detailed Description

Client API for NCBI NetSchedule server.

This API is logically divided into two sections: Job Submitter API and Worker Node API.

As objects of this class are only smart pointers to the real implementation, it is advisable that these objects are allocated on the stack rather than the heap.

See also
CNetServiceException, CNetScheduleException

Definition at line 85 of file netschedule_api.hpp.


The documentation for this class was generated from the following files:
Modified on Fri Sep 20 14:57:33 2024 by modify_doxy.py rev. 669887