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

Search Toolkit Book for CNetScheduleNotificationHandler

#include <connect/services/impl/netschedule_api_int.hpp>

+ Collaboration diagram for CNetScheduleNotificationHandler:

Public Types

enum  EJobStatusMask {
  fJSM_Pending = 1 << CNetScheduleAPI::ePending , fJSM_Running = 1 << CNetScheduleAPI::eRunning , fJSM_Canceled = 1 << CNetScheduleAPI::eCanceled , fJSM_Failed = 1 << CNetScheduleAPI::eFailed ,
  fJSM_Done = 1 << CNetScheduleAPI::eDone , fJSM_Reading = 1 << CNetScheduleAPI::eReading , fJSM_Confirmed = 1 << CNetScheduleAPI::eConfirmed , fJSM_ReadFailed = 1 << CNetScheduleAPI::eReadFailed ,
  fJSM_Deleted = 1 << CNetScheduleAPI::eDeleted
}
 
using TLastEventIndex = int
 
using TProgressMessage = string
 
using TJobInfo = tuple< CNetScheduleAPI::EJobStatus, TLastEventIndex, TProgressMessage >
 
typedef int TJobStatusMask
 

Public Member Functions

 CNetScheduleNotificationHandler ()
 
bool ReceiveNotification (string *server_host=NULL)
 
bool WaitForNotification (const CDeadline &deadline, string *server_host=NULL)
 
unsigned short GetPort () const
 
const stringGetMessage () const
 
void PrintPortNumber ()
 
void SubmitJob (CNetScheduleSubmitter::TInstance submitter, CNetScheduleJob &job, unsigned wait_time, CNetServer *server=NULL)
 
bool CheckJobStatusNotification (const string &job_id, CNetScheduleAPI::EJobStatus *job_status, int *last_event_index=NULL)
 
CNetScheduleAPI::EJobStatus WaitForJobCompletion (CNetScheduleJob &job, CDeadline &deadline, CNetScheduleAPI ns_api, time_t *job_exptime=NULL)
 
TJobInfo RequestJobWatching (CNetScheduleAPI::TInstance ns_api, const string &job_id, const CDeadline &deadline)
 
bool RequestJobWatching (CNetScheduleAPI::TInstance ns_api, const string &job_id, const CDeadline &deadline, CNetScheduleAPI::EJobStatus *job_status, int *last_event_index)
 
CNetScheduleAPI::EJobStatus WaitForJobEvent (const string &job_key, CDeadline &deadline, CNetScheduleAPI ns_api, TJobStatusMask status_mask, int last_event_index=kMax_Int, int *new_event_index=NULL)
 
void CmdAppendTimeoutGroupAndClientInfo (string &cmd, const CDeadline *deadline, const string &job_group)
 
bool RequestJob (CNetScheduleExecutor::TInstance executor, CNetScheduleJob &job, const string &cmd)
 
bool CheckRequestJobNotification (CNetScheduleExecutor::TInstance executor, CNetServer *server)
 

Static Public Member Functions

static string MkBaseGETCmd (CNetScheduleExecutor::EJobAffinityPreference affinity_preference, const string &affinity_list)
 

Protected Member Functions

bool GetJobDetailsIfCompleted (CNetScheduleAPI ns_api, CNetScheduleJob &job, time_t *job_exptime, CNetScheduleAPI::EJobStatus &job_status)
 

Protected Attributes

SNetScheduleNotificationReceiver m_Receiver
 

Detailed Description

Definition at line 77 of file netschedule_api_int.hpp.

Member Typedef Documentation

◆ TJobInfo

Definition at line 110 of file netschedule_api_int.hpp.

◆ TJobStatusMask

Definition at line 135 of file netschedule_api_int.hpp.

◆ TLastEventIndex

Definition at line 108 of file netschedule_api_int.hpp.

◆ TProgressMessage

Definition at line 109 of file netschedule_api_int.hpp.

Member Enumeration Documentation

◆ EJobStatusMask

Enumerator
fJSM_Pending 
fJSM_Running 
fJSM_Canceled 
fJSM_Failed 
fJSM_Done 
fJSM_Reading 
fJSM_Confirmed 
fJSM_ReadFailed 
fJSM_Deleted 

Definition at line 124 of file netschedule_api_int.hpp.

Constructor & Destructor Documentation

◆ CNetScheduleNotificationHandler()

CNetScheduleNotificationHandler::CNetScheduleNotificationHandler ( )

Definition at line 106 of file netschedule_api.cpp.

Member Function Documentation

◆ CheckJobStatusNotification()

bool CNetScheduleNotificationHandler::CheckJobStatusNotification ( const string job_id,
CNetScheduleAPI::EJobStatus job_status,
int last_event_index = NULL 
)

◆ CheckRequestJobNotification()

bool CNetScheduleNotificationHandler::CheckRequestJobNotification ( CNetScheduleExecutor::TInstance  executor,
CNetServer server 
)

◆ CmdAppendTimeoutGroupAndClientInfo()

void CNetScheduleNotificationHandler::CmdAppendTimeoutGroupAndClientInfo ( string cmd,
const CDeadline deadline,
const string job_group 
)

◆ GetJobDetailsIfCompleted()

bool CNetScheduleNotificationHandler::GetJobDetailsIfCompleted ( CNetScheduleAPI  ns_api,
CNetScheduleJob job,
time_t *  job_exptime,
CNetScheduleAPI::EJobStatus job_status 
)
protected

◆ GetMessage()

const string& CNetScheduleNotificationHandler::GetMessage ( void  ) const
inline

◆ GetPort()

unsigned short CNetScheduleNotificationHandler::GetPort ( void  ) const
inline

◆ MkBaseGETCmd()

string CNetScheduleNotificationHandler::MkBaseGETCmd ( CNetScheduleExecutor::EJobAffinityPreference  affinity_preference,
const string affinity_list 
)
static

◆ PrintPortNumber()

void CNetScheduleNotificationHandler::PrintPortNumber ( )

◆ ReceiveNotification()

bool CNetScheduleNotificationHandler::ReceiveNotification ( string server_host = NULL)

Definition at line 281 of file netschedule_api.cpp.

References m_Receiver.

Referenced by WaitForNotification().

◆ RequestJob()

bool CNetScheduleNotificationHandler::RequestJob ( CNetScheduleExecutor::TInstance  executor,
CNetScheduleJob job,
const string cmd 
)

◆ RequestJobWatching() [1/2]

CNetScheduleNotificationHandler::TJobInfo CNetScheduleNotificationHandler::RequestJobWatching ( CNetScheduleAPI::TInstance  ns_api,
const string job_id,
const CDeadline deadline 
)

◆ RequestJobWatching() [2/2]

bool CNetScheduleNotificationHandler::RequestJobWatching ( CNetScheduleAPI::TInstance  ns_api,
const string job_id,
const CDeadline deadline,
CNetScheduleAPI::EJobStatus job_status,
int last_event_index 
)
Deprecated:
, use tuple returning overload instead

Definition at line 501 of file netschedule_api_submitter.cpp.

References _ASSERT, and CNetScheduleAPI::eJobNotFound.

◆ SubmitJob()

void CNetScheduleNotificationHandler::SubmitJob ( CNetScheduleSubmitter::TInstance  submitter,
CNetScheduleJob job,
unsigned  wait_time,
CNetServer server = NULL 
)

◆ WaitForJobCompletion()

CNetScheduleAPI::EJobStatus CNetScheduleNotificationHandler::WaitForJobCompletion ( CNetScheduleJob job,
CDeadline deadline,
CNetScheduleAPI  ns_api,
time_t *  job_exptime = NULL 
)

◆ WaitForJobEvent()

CNetScheduleAPI::EJobStatus CNetScheduleNotificationHandler::WaitForJobEvent ( const string job_key,
CDeadline deadline,
CNetScheduleAPI  ns_api,
TJobStatusMask  status_mask,
int  last_event_index = kMax_Int,
int new_event_index = NULL 
)

◆ WaitForNotification()

bool CNetScheduleNotificationHandler::WaitForNotification ( const CDeadline deadline,
string server_host = NULL 
)

Member Data Documentation

◆ m_Receiver

SNetScheduleNotificationReceiver CNetScheduleNotificationHandler::m_Receiver
protected

The documentation for this class was generated from the following files:
Modified on Wed Feb 21 09:58:25 2024 by modify_doxy.py rev. 669887