#include <netschedule_api.hpp>
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.
Definition at line 86 of file netschedule_api.hpp.
Private Types | |
| typedef unsigned | TJobMask |
| typedef pair< string, string > | TJobTag |
| Key-value pair, value can be empty. | |
| typedef vector< TJobTag > | TJobTags |
| enum | EJobStatus { eJobNotFound = -1, ePending = 0, eRunning, eReturned, eCanceled, eFailed, eDone, eReading, eConfirmed, eReadFailed, eTimeout, eReadTimeout, eLastStatus } |
| Job status codes NB: eReturned, eTimeout and eReadTimeout states are visible only in job history, and ePending cannot be there. More... | |
| enum | EJobMask { eEmptyMask = 0, eExclusiveJob = (1 << 0), eOutOfOrder = (1 << 1), eForEachNode = (1 << 2), eSystemJob = (1 << 3), eUserMask = (1 << 16) } |
| Job masks. More... | |
| enum | EConnectionMode { eCloseConnection, eKeepConnection } |
| Connection management options. More... | |
Private Member Functions | |
| NCBI_NET_COMPONENT (NetScheduleAPI) | |
| CNetScheduleAPI (const string &service_name, const string &client_name, const string &queue_name) | |
| Construct the client without linking it to any particular server. | |
| void | SetProgramVersion (const string &pv) |
| Set program version (like: MyProgram v. | |
| const string & | GetProgramVersion () const |
| Get program version string. | |
| const string & | GetQueueName () const |
| Return Queue name. | |
| CNetScheduleSubmitter | GetSubmitter () |
| CNetScheduleExecuter | GetExecuter (unsigned short control_port=0) |
| Create an instance of CNetScheduleExecuter. | |
| CNetScheduleAdmin | GetAdmin () |
| CNetService | GetService () |
| const SServerParams & | GetServerParams () |
| EJobStatus | GetJobDetails (CNetScheduleJob &job) |
| Get job details. | |
| void | GetProgressMsg (CNetScheduleJob &job) |
| void | SetCommunicationTimeout (const STimeout &to) |
| NCBI_DEPRECATED void | SetConnMode (EConnectionMode conn_mode) |
| Please do not use this method. | |
Static Private Member Functions | |
| static string | StatusToString (EJobStatus status) |
| Printable status type. | |
| static EJobStatus | StringToStatus (const string &status_str) |
| Parse status string into enumerator value. | |
Classes | |
| struct | SServerParams |
|
|
Definition at line 176 of file netschedule_api.hpp. |
|
|
Key-value pair, value can be empty.
Definition at line 179 of file netschedule_api.hpp. |
|
|
Definition at line 180 of file netschedule_api.hpp. |
|
|
Connection management options.
Definition at line 213 of file netschedule_api.hpp. |
|
|
Job masks.
Definition at line 160 of file netschedule_api.hpp. |
|
|
Job status codes NB: eReturned, eTimeout and eReadTimeout states are visible only in job history, and ePending cannot be there.
Definition at line 124 of file netschedule_api.hpp. |
|
||||||||||||||||
|
Construct the client without linking it to any particular server. Actual server (host and port) will be extracted from the job key
Definition at line 156 of file netschedule_api.cpp. |
|
|
Definition at line 270 of file netschedule_api.cpp. Referenced by CNSInfoCollector::DropQueue(), CNSInfoCollector::GetQueues(), CWNodeShutdownAction::operator()(), CNetScheduleControl::Run(), CNetScheduleCheck::Run(), and CNSInfoCollector::TraverseNodes(). |
|
|
Create an instance of CNetScheduleExecuter.
Definition at line 265 of file netschedule_api.cpp. Referenced by CSampleNetScheduleNode::Run(), and CNetScheduleCheck::Run(). |
|
|
Get job details. These attributes are not supported yet Definition at line 281 of file netschedule_api.cpp. References CNetScheduleJob::affinity, eCanceled, eConfirmed, eDone, eFailed, ePending, eReadFailed, eReading, eReturned, CNetScheduleJob::error_msg, eRunning, CNetScheduleJob::input, CNetScheduleJob::job_id, CNetScheduleJob::mask, CNetScheduleJob::output, NStr::ParseEscapes(), CNetScheduleJob::progress_msg, CNetScheduleJob::ret_code, and CNetScheduleJob::tags. Referenced by CNSJobInfo::x_Load(). |
|
|
Get program version string.
Definition at line 170 of file netschedule_api.cpp. |
|
|
Definition at line 451 of file netschedule_api.cpp. References CNetScheduleJob::job_id, NStr::ParseEscapes(), and CNetScheduleJob::progress_msg. Referenced by CNSJobInfo::x_Load(). |
|
|
Return Queue name.
Definition at line 175 of file netschedule_api.cpp. Referenced by CGridWorkerNode::GetQueueName(), and CGridWorkerNode::x_AreMastersBusy(). |
|
|
Definition at line 446 of file netschedule_api.cpp. Referenced by CGridWorkerNode::GetServerOutputSize(), and SNetScheduleSubmitterImpl::SubmitJobImpl(). |
|
|
Definition at line 275 of file netschedule_api.cpp. Referenced by CGridWorkerNode::GetClientName(), CGridWorkerNode::GetServiceName(), CGridWorkerNode::IsTimeToRebalance(), SetCommunicationTimeout(), SetConnMode(), and CGridWorkerNode::x_AreMastersBusy(). |
|
|
Definition at line 260 of file netschedule_api.cpp. Referenced by CNSInfoCollector::CancelJob(), CGridClientApp::Init(), CSampleNetScheduleClient::Run(), and CNetScheduleCheck::Run(). |
|
|
|
|
|
Definition at line 209 of file netschedule_api.hpp. References GetService(), and CNetService::SetCommunicationTimeout(). |
|
|
Please do not use this method. The eKeepConnection connection mode is the default now. Definition at line 227 of file netschedule_api.hpp. References eCloseConnection, eOff, eOn, GetService(), and CNetService::SetPermanentConnection(). |
|
|
Set program version (like: MyProgram v. 1.2.3) Program version is passed to NetSchedule queue so queue controls versions and does not allow obsolete clients to connect and submit or execute jobs Definition at line 163 of file netschedule_api.cpp. Referenced by CGridClientApp::Init(), CGridCgiApplication::InitGridClient(), and CRemoteAppDispatcher::x_CreateNSClient(). |
|
|
|
Parse status string into enumerator value. Acceptable string values: Pending, Running, Returned, Canceled, Failed, Done, Reading, Confirmed, ReadFailed, Timeout, ReadTimeout Abbreviated Pend, Run, Return, Cancel, Fail
Definition at line 202 of file netschedule_api.cpp. References NStr::CompareNocase(), eCanceled, eConfirmed, eDone, eFailed, eJobNotFound, ePending, eReadFailed, eReading, eReadTimeout, eReturned, eRunning, and eTimeout. Referenced by CQueryFunctionEQ::Evaluate(), CNetScheduleHandler::ProcessPrintQueue(), CNSRemoveJobControlApp::Run(), and CNetScheduleAdmin::StatusSnapshot(). |
1.4.6
Modified on Wed Dec 09 08:19:32 2009 by modify_doxy.py rev. 173732