NCBI C++ ToolKit
Classes | Public Types | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
CNetScheduleHandler Class Reference

Search Toolkit Book for CNetScheduleHandler

ConnectionHandler for NetScheduler. More...

#include "ns_handler.hpp"
(Private to src/app/netschedule.)

+ Inheritance diagram for CNetScheduleHandler:
+ Collaboration diagram for CNetScheduleHandler:

Classes

struct  SCommandExtra
 

Public Types

enum  EHTTPStatus {
  eStatus_OK = 200 , eStatus_BadRequest = 400 , eStatus_BadAuth = 401 , eStatus_NotFound = 404 ,
  eStatus_Inactive = 408 , eStatus_InvalidJobStatus = 409 , eStatus_HTTPProbe = 444 , eStatus_SocketIOError = 499 ,
  eStatus_ServerError = 500 , eStatus_NotImplemented = 501 , eStatus_SubmitRefused = 503 , eStatus_ShuttingDown = 503
}
 Statuses of commands to be set in diagnostics' request context Additional statuses can be taken from http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html. More...
 
typedef void(CNetScheduleHandler::* FProcessor) (CQueue *)
 
typedef SNSProtoCmdDef< SCommandExtraSCommandMap
 
typedef SNSProtoParsedCmd< SCommandExtraSParsedCmd
 
typedef CNetServProtoParser< SCommandExtraTProtoParser
 
- Public Types inherited from IServer_ConnectionHandler
enum  EClosePeer { eOurClose , eClientClose }
 Type of connection closing. More...
 

Public Member Functions

 CNetScheduleHandler (CNetScheduleServer *server)
 
 ~CNetScheduleHandler ()
 
virtual void OnOpen (void)
 Runs in response to an external event [asynchronous]. More...
 
virtual void OnWrite (void)
 The client is ready to receive data. More...
 
virtual void OnClose (IServer_ConnectionHandler::EClosePeer peer)
 The connection has closed (with information on type of closing) More...
 
virtual void OnTimeout (void)
 Runs when a client has been idle for too long, prior to closing the connection [synchronous]. More...
 
virtual void OnOverflow (EOverflowReason reason)
 Runs when there are insufficient resources to queue a connection, prior to closing it. More...
 
virtual void OnMessage (BUF buffer)
 
virtual void OnError (const string &err_message)
 Runs when a socket error is detected. More...
 
- Public Member Functions inherited from IServer_LineMessageHandler
 IServer_LineMessageHandler ()
 
virtual int CheckMessage (BUF *buffer, const void *data, size_t size)
 
- Public Member Functions inherited from IServer_MessageHandler
 IServer_MessageHandler ()
 
virtual ~IServer_MessageHandler ()
 
virtual void OnRead (void)
 The client has just sent data. More...
 
- Public Member Functions inherited from IServer_ConnectionHandler
virtual ~IServer_ConnectionHandler ()
 
virtual EIO_Event GetEventsToPollFor (const CTime **) const
 Following three methods are guaranteed to be called NOT at the same time as On*, so if you implement them you should not guard the variables which they can use with mutexes. More...
 
virtual const STimeoutGetTimeout (void)
 Returns the timeout for this connection. More...
 
virtual bool IsOpen (void)
 Returns connection handler's perception of whether we open or not. More...
 
virtual bool IsReadyToProcess (void) const
 Returns the handler's readiness to process input data or to write some output data. More...
 
virtual void OnTimer (void)
 This method is called at the moment in time specified earlier by the alarm_time parameter of the GetEventsToPollFor method [synchronous]. More...
 
CSocketGetSocket (void)
 Get underlying socket. More...
 
void SetSocket (CSocket *socket)
 

Private Member Functions

unsigned int x_GetPeerAddress (void)
 
void x_ProcessMsgAuth (BUF buffer)
 
void x_ProcessMsgQueue (BUF buffer)
 
void x_ProcessMsgRequest (BUF buffer)
 
void x_UpdateClientPassedChecks (CQueue *q)
 
void x_ProcessMsgBatchHeader (BUF buffer)
 
void x_ProcessMsgBatchJob (BUF buffer)
 
void x_ProcessMsgBatchSubmit (BUF buffer)
 
void x_SetQuickAcknowledge (void)
 
void x_SetCmdRequestStatus (unsigned int status)
 
void x_SetConnRequestStatus (unsigned int status)
 
EIO_Status x_WriteMessage (const string &msg)
 
EIO_Status x_PrepareWriteBuffer (const string &msg, size_t msg_size, size_t required_size)
 
void x_HandleSocketErrorOnResponse (const string &msg, EIO_Status write_result, size_t written_bytes, const CNSPreciseTime &timing)
 
void x_ProcessFastStatusS (CQueue *)
 
void x_ProcessFastStatusW (CQueue *)
 
void x_ProcessChangeAffinity (CQueue *)
 
void x_ProcessSetAffinity (CQueue *)
 
void x_ProcessSubmit (CQueue *)
 
void x_ProcessSubmitBatch (CQueue *)
 
void x_ProcessBatchStart (CQueue *)
 
void x_ProcessBatchSequenceEnd (CQueue *)
 
void x_ProcessCancel (CQueue *)
 
void x_ProcessStatus (CQueue *)
 
void x_ProcessGetJob (CQueue *)
 
void x_ProcessCancelWaitGet (CQueue *)
 
void x_ProcessCancelWaitRead (CQueue *)
 
void x_ProcessPut (CQueue *)
 
void x_ProcessJobExchange (CQueue *)
 
void x_ProcessPutMessage (CQueue *)
 
void x_ProcessGetMessage (CQueue *)
 
void x_ProcessPutFailure (CQueue *)
 
void x_ProcessDropQueue (CQueue *)
 
void x_ProcessReturn (CQueue *)
 
void x_ProcessReschedule (CQueue *)
 
void x_ProcessJobDelayExpiration (CQueue *)
 
void x_ProcessJobDelayReadExpiration (CQueue *)
 
void x_ProcessListenJob (CQueue *)
 
void x_ProcessStatistics (CQueue *)
 
void x_ProcessStatusSnapshot (CQueue *)
 
void x_ProcessReloadConfig (CQueue *)
 
void x_ProcessActiveCount (CQueue *)
 
void x_ProcessDump (CQueue *)
 
void x_ProcessShutdown (CQueue *)
 
void x_ProcessGetConf (CQueue *)
 
void x_ProcessVersion (CQueue *)
 
void x_ProcessHealth (CQueue *)
 
void x_ProcessAckAlert (CQueue *)
 
void x_ProcessQList (CQueue *)
 
void x_ProcessQuitSession (CQueue *)
 
void x_ProcessCreateDynamicQueue (CQueue *)
 
void x_ProcessDeleteDynamicQueue (CQueue *)
 
void x_ProcessQueueInfo (CQueue *)
 
void x_ProcessSetQueue (CQueue *)
 
void x_ProcessSetScope (CQueue *)
 
void x_ProcessGetParam (CQueue *)
 
void x_ProcessGetConfiguration (CQueue *)
 
void x_ProcessReading (CQueue *)
 
void x_ProcessConfirm (CQueue *)
 
void x_ProcessReadFailed (CQueue *)
 
void x_ProcessReadRollback (CQueue *)
 
void x_FinalizeReadCommand (const string &command, TJobStatus status, const CJob &job)
 
void x_ProcessSetClientData (CQueue *)
 
void x_ProcessClearWorkerNode (CQueue *)
 
void x_ProcessCancelQueue (CQueue *)
 
void x_ProcessRefuseSubmits (CQueue *)
 
void x_ProcessPause (CQueue *)
 
void x_ProcessResume (CQueue *)
 
void x_ProcessReread (CQueue *)
 
void x_ProcessRedo (CQueue *)
 
void x_CmdNotImplemented (CQueue *)
 
void x_CmdObsolete (CQueue *)
 
void x_CheckNonAnonymousClient (const string &message)
 
void x_CheckPortAndTimeout (void)
 
void x_CheckAuthorizationToken (void)
 
void x_CheckGetParameters (void)
 
void x_CheckReadParameters (void)
 
void x_CheckQInf2Parameters (void)
 
CRef< CQueueGetQueue (void)
 
void x_CreateConnContext (void)
 
void x_OnCmdParserError (bool need_request_start, const string &msg, const string &suffix)
 
void x_StatisticsNew (CQueue *q, const string &what, const CNSPreciseTime &curr)
 
void x_PrintCmdRequestStart (const SParsedCmd &cmd)
 
void x_PrintCmdRequestStart (CTempString msg)
 
void x_PrintCmdRequestStop (void)
 
void x_PrintGetJobResponse (const CQueue *q, const CJob &job, bool add_security_token)
 
bool x_CanBeWithoutQueue (FProcessor processor) const
 
bool x_NeedToGeneratePHIDAndSID (FProcessor processor) const
 
bool x_WorkerNodeCommand (void) const
 
void x_LogCommandWithJob (const CJob &job) const
 
void x_LogCommandWithJob (const string &client_ip, const string &client_sid, const string &phid) const
 
void x_ClearRollbackAction (void)
 
void x_ExecuteRollbackAction (CQueue *q)
 
string x_GetServerSection (void) const
 
string x_GetStoredSectionValues (const string &section_name, const map< string, string > &values) const
 
string x_GetLogSection (void) const
 
string x_GetDiagSection (void) const
 
vector< TJobStatusx_RemoveDuplicateStatuses (const vector< TJobStatus > &src, vector< string > &warnings) const
 
bool x_NeedCmdLogging (void) const
 
void x_SetRequestContext (void)
 
string x_GetConnRef (void) const
 

Static Private Member Functions

static void x_MakeSureSingleEOR (string &message)
 

Private Attributes

size_t m_MsgBufferSize
 
char * m_MsgBuffer
 
string m_RawAuthString
 
CNSClientId m_ClientId
 
CNetScheduleServerm_Server
 
string m_QueueName
 
CWeakRef< CQueuem_QueueRef
 
SNSCommandArguments m_CommandArguments
 
void(CNetScheduleHandler::* m_ProcessMessage )(BUF buffer)
 
unsigned m_BatchSize
 
unsigned m_BatchPos
 
CStopWatch m_BatchStopWatch
 
vector< pair< CJob, string > > m_BatchJobs
 
string m_BatchGroup
 
unsigned m_BatchSubmPort
 
CNSPreciseTime m_BatchSubmTimeout
 
string m_BatchClientIP
 
string m_BatchClientSID
 
string m_BatchNCBIPHID
 
bool m_WithinBatchSubmit
 
TProtoParser m_SingleCmdParser
 
TProtoParser m_BatchHeaderParser
 
TProtoParser m_BatchEndParser
 
CRef< CRequestContextm_ConnContext
 
CRef< CRequestContextm_CmdContext
 
bool m_ClientIdentificationPrinted
 
CNSRollbackInterfacem_RollbackAction
 

Static Private Attributes

static SCommandMap sm_CommandMap []
 
static SCommandMap sm_BatchHeaderMap []
 
static SCommandMap sm_BatchEndMap []
 

Detailed Description

ConnectionHandler for NetScheduler.

Definition at line 78 of file ns_handler.hpp.

Member Typedef Documentation

◆ FProcessor

typedef void(CNetScheduleHandler::* CNetScheduleHandler::FProcessor) (CQueue *)

Definition at line 147 of file ns_handler.hpp.

◆ SCommandMap

Definition at line 152 of file ns_handler.hpp.

◆ SParsedCmd

Definition at line 153 of file ns_handler.hpp.

◆ TProtoParser

Definition at line 154 of file ns_handler.hpp.

Member Enumeration Documentation

◆ EHTTPStatus

Statuses of commands to be set in diagnostics' request context Additional statuses can be taken from http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html.

Enumerator
eStatus_OK 

Command is ok and execution is good.

eStatus_BadRequest 

Command is incorrect.

eStatus_BadAuth 

Bad authorization token.

eStatus_NotFound 

Job is not found.

eStatus_Inactive 

Connection was closed due to inactivity timeout.

eStatus_InvalidJobStatus 

Invalid job status.

eStatus_HTTPProbe 

Routine test from systems.

eStatus_SocketIOError 

Error writing to socket.

eStatus_ServerError 

Internal server error.

eStatus_NotImplemented 

Command is not implemented.

eStatus_SubmitRefused 

In refuse submits mode and received SUBMIT.

eStatus_ShuttingDown 

Server is shutting down.

Definition at line 96 of file ns_handler.hpp.

Constructor & Destructor Documentation

◆ CNetScheduleHandler()

CNetScheduleHandler::CNetScheduleHandler ( CNetScheduleServer server)

Definition at line 611 of file ns_handler.cpp.

◆ ~CNetScheduleHandler()

CNetScheduleHandler::~CNetScheduleHandler ( )

Definition at line 628 of file ns_handler.cpp.

References m_MsgBuffer, and x_ClearRollbackAction().

Member Function Documentation

◆ GetQueue()

CRef<CQueue> CNetScheduleHandler::GetQueue ( void  )
inlineprivate

◆ OnClose()

void CNetScheduleHandler::OnClose ( IServer_ConnectionHandler::EClosePeer  )
virtual

◆ OnError()

void CNetScheduleHandler::OnError ( const string )
virtual

Runs when a socket error is detected.

Reimplemented from IServer_ConnectionHandler.

Definition at line 840 of file ns_handler.cpp.

References ERR_POST, and Warning().

◆ OnMessage()

void CNetScheduleHandler::OnMessage ( BUF  buffer)
virtual

◆ OnOpen()

void CNetScheduleHandler::OnOpen ( void  )
virtual

Runs in response to an external event [asynchronous].

You can get socket by calling GetSocket(), if you close the socket this object will be destroyed. Individual events are: A client has just established this connection.

Implements IServer_ConnectionHandler.

Definition at line 635 of file ns_handler.cpp.

References CSocket::DisableOSSendDelay(), eIO_ReadWrite, CNetScheduleServer::GetInactivityTimeout(), IServer_ConnectionHandler::GetSocket(), CNetScheduleServer::IsLog(), m_ProcessMessage, m_Server, CSocket::SetTimeout(), x_CreateConnContext(), x_ProcessMsgAuth(), and x_SetQuickAcknowledge().

◆ OnOverflow()

void CNetScheduleHandler::OnOverflow ( EOverflowReason  )
virtual

Runs when there are insufficient resources to queue a connection, prior to closing it.

Provides a reason why the connection is being close, which can be reported back to the client.

Reimplemented from IServer_ConnectionHandler.

Definition at line 739 of file ns_handler.cpp.

References eOR_ConnectionPoolFull, eOR_RequestQueueFull, eOR_UnpollableSocket, ERR_POST, and x_SetRequestContext().

◆ OnTimeout()

void CNetScheduleHandler::OnTimeout ( void  )
virtual

Runs when a client has been idle for too long, prior to closing the connection [synchronous].

Reimplemented from IServer_ConnectionHandler.

Definition at line 729 of file ns_handler.cpp.

References eStatus_Inactive, m_ConnContext, CRef< C, Locker >::NotNull(), CRequestContext::SetRequestStatus(), and x_SetRequestContext().

◆ OnWrite()

void CNetScheduleHandler::OnWrite ( void  )
virtual

The client is ready to receive data.

Implements IServer_ConnectionHandler.

Definition at line 654 of file ns_handler.cpp.

◆ x_CanBeWithoutQueue()

bool CNetScheduleHandler::x_CanBeWithoutQueue ( FProcessor  processor) const
private

◆ x_CheckAuthorizationToken()

void CNetScheduleHandler::x_CheckAuthorizationToken ( void  )
private

◆ x_CheckGetParameters()

void CNetScheduleHandler::x_CheckGetParameters ( void  )
private

◆ x_CheckNonAnonymousClient()

void CNetScheduleHandler::x_CheckNonAnonymousClient ( const string message)
private

◆ x_CheckPortAndTimeout()

void CNetScheduleHandler::x_CheckPortAndTimeout ( void  )
private

◆ x_CheckQInf2Parameters()

void CNetScheduleHandler::x_CheckQInf2Parameters ( void  )
private

◆ x_CheckReadParameters()

void CNetScheduleHandler::x_CheckReadParameters ( void  )
private

◆ x_ClearRollbackAction()

void CNetScheduleHandler::x_ClearRollbackAction ( void  )
private

◆ x_CmdNotImplemented()

void CNetScheduleHandler::x_CmdNotImplemented ( CQueue )
private

◆ x_CmdObsolete()

void CNetScheduleHandler::x_CmdObsolete ( CQueue )
private

◆ x_CreateConnContext()

void CNetScheduleHandler::x_CreateConnContext ( void  )
private

◆ x_ExecuteRollbackAction()

void CNetScheduleHandler::x_ExecuteRollbackAction ( CQueue q)
private

◆ x_FinalizeReadCommand()

void CNetScheduleHandler::x_FinalizeReadCommand ( const string command,
TJobStatus  status,
const CJob job 
)
private

◆ x_GetConnRef()

string CNetScheduleHandler::x_GetConnRef ( void  ) const
private

◆ x_GetDiagSection()

string CNetScheduleHandler::x_GetDiagSection ( void  ) const
private

◆ x_GetLogSection()

string CNetScheduleHandler::x_GetLogSection ( void  ) const
private

◆ x_GetPeerAddress()

unsigned int CNetScheduleHandler::x_GetPeerAddress ( void  )
private

◆ x_GetServerSection()

string CNetScheduleHandler::x_GetServerSection ( void  ) const
private

◆ x_GetStoredSectionValues()

string CNetScheduleHandler::x_GetStoredSectionValues ( const string section_name,
const map< string, string > &  values 
) const
private

◆ x_HandleSocketErrorOnResponse()

void CNetScheduleHandler::x_HandleSocketErrorOnResponse ( const string msg,
EIO_Status  write_result,
size_t  written_bytes,
const CNSPreciseTime timing 
)
private

◆ x_LogCommandWithJob() [1/2]

void CNetScheduleHandler::x_LogCommandWithJob ( const CJob job) const
private

◆ x_LogCommandWithJob() [2/2]

void CNetScheduleHandler::x_LogCommandWithJob ( const string client_ip,
const string client_sid,
const string phid 
) const
private

◆ x_MakeSureSingleEOR()

void CNetScheduleHandler::x_MakeSureSingleEOR ( string message)
staticprivate

Definition at line 4744 of file ns_handler.cpp.

References NStr::EndsWith(), and kEndOfResponse.

Referenced by x_ProcessStatistics(), and x_StatisticsNew().

◆ x_NeedCmdLogging()

bool CNetScheduleHandler::x_NeedCmdLogging ( void  ) const
private

◆ x_NeedToGeneratePHIDAndSID()

bool CNetScheduleHandler::x_NeedToGeneratePHIDAndSID ( FProcessor  processor) const
private

Definition at line 4427 of file ns_handler.cpp.

References x_ProcessSubmit(), and x_ProcessSubmitBatch().

Referenced by x_ProcessMsgRequest().

◆ x_OnCmdParserError()

void CNetScheduleHandler::x_OnCmdParserError ( bool  need_request_start,
const string msg,
const string suffix 
)
private

◆ x_PrepareWriteBuffer()

EIO_Status CNetScheduleHandler::x_PrepareWriteBuffer ( const string msg,
size_t  msg_size,
size_t  required_size 
)
private

◆ x_PrintCmdRequestStart() [1/2]

void CNetScheduleHandler::x_PrintCmdRequestStart ( const SParsedCmd cmd)
private

◆ x_PrintCmdRequestStart() [2/2]

void CNetScheduleHandler::x_PrintCmdRequestStart ( CTempString  msg)
private

◆ x_PrintCmdRequestStop()

void CNetScheduleHandler::x_PrintCmdRequestStop ( void  )
private

Definition at line 4301 of file ns_handler.cpp.

References GetDiagContext(), m_CmdContext, CRef< C, Locker >::NotNull(), CDiagContext::PrintRequestStop(), CRef< C, Locker >::Reset(), and CDiagContext::SetRequestContext().

Referenced by OnMessage(), x_CmdNotImplemented(), x_CmdObsolete(), x_FinalizeReadCommand(), x_ProcessAckAlert(), x_ProcessActiveCount(), x_ProcessBatchSequenceEnd(), x_ProcessCancel(), x_ProcessCancelQueue(), x_ProcessCancelWaitGet(), x_ProcessCancelWaitRead(), x_ProcessChangeAffinity(), x_ProcessClearWorkerNode(), x_ProcessCreateDynamicQueue(), x_ProcessDeleteDynamicQueue(), x_ProcessDropQueue(), x_ProcessDump(), x_ProcessFastStatusS(), x_ProcessFastStatusW(), x_ProcessGetConf(), x_ProcessGetConfiguration(), x_ProcessGetJob(), x_ProcessGetMessage(), x_ProcessGetParam(), x_ProcessHealth(), x_ProcessJobDelayExpiration(), x_ProcessJobDelayReadExpiration(), x_ProcessJobExchange(), x_ProcessListenJob(), x_ProcessMsgBatchHeader(), x_ProcessMsgBatchJob(), x_ProcessMsgBatchSubmit(), x_ProcessPause(), x_ProcessPut(), x_ProcessPutFailure(), x_ProcessPutMessage(), x_ProcessQList(), x_ProcessQueueInfo(), x_ProcessReading(), x_ProcessRedo(), x_ProcessRefuseSubmits(), x_ProcessReloadConfig(), x_ProcessReread(), x_ProcessReschedule(), x_ProcessResume(), x_ProcessReturn(), x_ProcessSetAffinity(), x_ProcessSetClientData(), x_ProcessSetQueue(), x_ProcessSetScope(), x_ProcessShutdown(), x_ProcessStatistics(), x_ProcessStatus(), x_ProcessSubmit(), x_ProcessSubmitBatch(), x_ProcessVersion(), and x_StatisticsNew().

◆ x_PrintGetJobResponse()

void CNetScheduleHandler::x_PrintGetJobResponse ( const CQueue q,
const CJob job,
bool  add_security_token 
)
private

◆ x_ProcessAckAlert()

void CNetScheduleHandler::x_ProcessAckAlert ( CQueue )
private

◆ x_ProcessActiveCount()

void CNetScheduleHandler::x_ProcessActiveCount ( CQueue q)
private

◆ x_ProcessBatchSequenceEnd()

void CNetScheduleHandler::x_ProcessBatchSequenceEnd ( CQueue )
private

◆ x_ProcessBatchStart()

void CNetScheduleHandler::x_ProcessBatchStart ( CQueue )
private

◆ x_ProcessCancel()

void CNetScheduleHandler::x_ProcessCancel ( CQueue q)
private

◆ x_ProcessCancelQueue()

void CNetScheduleHandler::x_ProcessCancelQueue ( CQueue q)
private

◆ x_ProcessCancelWaitGet()

void CNetScheduleHandler::x_ProcessCancelWaitGet ( CQueue q)
private

◆ x_ProcessCancelWaitRead()

void CNetScheduleHandler::x_ProcessCancelWaitRead ( CQueue q)
private

◆ x_ProcessChangeAffinity()

void CNetScheduleHandler::x_ProcessChangeAffinity ( CQueue q)
private

◆ x_ProcessClearWorkerNode()

void CNetScheduleHandler::x_ProcessClearWorkerNode ( CQueue q)
private

◆ x_ProcessConfirm()

void CNetScheduleHandler::x_ProcessConfirm ( CQueue q)
private

◆ x_ProcessCreateDynamicQueue()

void CNetScheduleHandler::x_ProcessCreateDynamicQueue ( CQueue )
private

◆ x_ProcessDeleteDynamicQueue()

void CNetScheduleHandler::x_ProcessDeleteDynamicQueue ( CQueue )
private

◆ x_ProcessDropQueue()

void CNetScheduleHandler::x_ProcessDropQueue ( CQueue q)
private

◆ x_ProcessDump()

void CNetScheduleHandler::x_ProcessDump ( CQueue q)
private

◆ x_ProcessFastStatusS()

void CNetScheduleHandler::x_ProcessFastStatusS ( CQueue q)
private

◆ x_ProcessFastStatusW()

void CNetScheduleHandler::x_ProcessFastStatusW ( CQueue q)
private

◆ x_ProcessGetConf()

void CNetScheduleHandler::x_ProcessGetConf ( CQueue )
private

◆ x_ProcessGetConfiguration()

void CNetScheduleHandler::x_ProcessGetConfiguration ( CQueue q)
private

◆ x_ProcessGetJob()

void CNetScheduleHandler::x_ProcessGetJob ( CQueue q)
private

◆ x_ProcessGetMessage()

void CNetScheduleHandler::x_ProcessGetMessage ( CQueue q)
private

◆ x_ProcessGetParam()

void CNetScheduleHandler::x_ProcessGetParam ( CQueue q)
private

◆ x_ProcessHealth()

void CNetScheduleHandler::x_ProcessHealth ( CQueue )
private

◆ x_ProcessJobDelayExpiration()

void CNetScheduleHandler::x_ProcessJobDelayExpiration ( CQueue q)
private

◆ x_ProcessJobDelayReadExpiration()

void CNetScheduleHandler::x_ProcessJobDelayReadExpiration ( CQueue q)
private

◆ x_ProcessJobExchange()

void CNetScheduleHandler::x_ProcessJobExchange ( CQueue q)
private

◆ x_ProcessListenJob()

void CNetScheduleHandler::x_ProcessListenJob ( CQueue q)
private

◆ x_ProcessMsgAuth()

void CNetScheduleHandler::x_ProcessMsgAuth ( BUF  buffer)
private

◆ x_ProcessMsgBatchHeader()

void CNetScheduleHandler::x_ProcessMsgBatchHeader ( BUF  buffer)
private

◆ x_ProcessMsgBatchJob()

void CNetScheduleHandler::x_ProcessMsgBatchJob ( BUF  buffer)
private

◆ x_ProcessMsgBatchSubmit()

void CNetScheduleHandler::x_ProcessMsgBatchSubmit ( BUF  buffer)
private

◆ x_ProcessMsgQueue()

void CNetScheduleHandler::x_ProcessMsgQueue ( BUF  buffer)
private

◆ x_ProcessMsgRequest()

void CNetScheduleHandler::x_ProcessMsgRequest ( BUF  buffer)
private

◆ x_ProcessPause()

void CNetScheduleHandler::x_ProcessPause ( CQueue q)
private

◆ x_ProcessPut()

void CNetScheduleHandler::x_ProcessPut ( CQueue q)
private

◆ x_ProcessPutFailure()

void CNetScheduleHandler::x_ProcessPutFailure ( CQueue q)
private

◆ x_ProcessPutMessage()

void CNetScheduleHandler::x_ProcessPutMessage ( CQueue q)
private

◆ x_ProcessQList()

void CNetScheduleHandler::x_ProcessQList ( CQueue )
private

◆ x_ProcessQueueInfo()

void CNetScheduleHandler::x_ProcessQueueInfo ( CQueue )
private

◆ x_ProcessQuitSession()

void CNetScheduleHandler::x_ProcessQuitSession ( CQueue )
private

◆ x_ProcessReadFailed()

void CNetScheduleHandler::x_ProcessReadFailed ( CQueue q)
private

◆ x_ProcessReading()

void CNetScheduleHandler::x_ProcessReading ( CQueue q)
private

◆ x_ProcessReadRollback()

void CNetScheduleHandler::x_ProcessReadRollback ( CQueue q)
private

◆ x_ProcessRedo()

void CNetScheduleHandler::x_ProcessRedo ( CQueue q)
private

◆ x_ProcessRefuseSubmits()

void CNetScheduleHandler::x_ProcessRefuseSubmits ( CQueue q)
private

◆ x_ProcessReloadConfig()

void CNetScheduleHandler::x_ProcessReloadConfig ( CQueue q)
private

◆ x_ProcessReread()

void CNetScheduleHandler::x_ProcessReread ( CQueue q)
private

◆ x_ProcessReschedule()

void CNetScheduleHandler::x_ProcessReschedule ( CQueue q)
private

◆ x_ProcessResume()

void CNetScheduleHandler::x_ProcessResume ( CQueue q)
private

◆ x_ProcessReturn()

void CNetScheduleHandler::x_ProcessReturn ( CQueue q)
private

◆ x_ProcessSetAffinity()

void CNetScheduleHandler::x_ProcessSetAffinity ( CQueue q)
private

◆ x_ProcessSetClientData()

void CNetScheduleHandler::x_ProcessSetClientData ( CQueue q)
private

◆ x_ProcessSetQueue()

void CNetScheduleHandler::x_ProcessSetQueue ( CQueue )
private

◆ x_ProcessSetScope()

void CNetScheduleHandler::x_ProcessSetScope ( CQueue q)
private

◆ x_ProcessShutdown()

void CNetScheduleHandler::x_ProcessShutdown ( CQueue )
private

◆ x_ProcessStatistics()

void CNetScheduleHandler::x_ProcessStatistics ( CQueue q)
private

◆ x_ProcessStatus()

void CNetScheduleHandler::x_ProcessStatus ( CQueue q)
private

◆ x_ProcessStatusSnapshot()

void CNetScheduleHandler::x_ProcessStatusSnapshot ( CQueue )
private

◆ x_ProcessSubmit()

void CNetScheduleHandler::x_ProcessSubmit ( CQueue q)
private

◆ x_ProcessSubmitBatch()

void CNetScheduleHandler::x_ProcessSubmitBatch ( CQueue q)
private

◆ x_ProcessVersion()

void CNetScheduleHandler::x_ProcessVersion ( CQueue )
private

◆ x_RemoveDuplicateStatuses()

vector< TJobStatus > CNetScheduleHandler::x_RemoveDuplicateStatuses ( const vector< TJobStatus > &  src,
vector< string > &  warnings 
) const
private

◆ x_SetCmdRequestStatus()

void CNetScheduleHandler::x_SetCmdRequestStatus ( unsigned int  status)
inlineprivate

◆ x_SetConnRequestStatus()

void CNetScheduleHandler::x_SetConnRequestStatus ( unsigned int  status)
inlineprivate

◆ x_SetQuickAcknowledge()

void CNetScheduleHandler::x_SetQuickAcknowledge ( void  )
private

◆ x_SetRequestContext()

void CNetScheduleHandler::x_SetRequestContext ( void  )
private

◆ x_StatisticsNew()

void CNetScheduleHandler::x_StatisticsNew ( CQueue q,
const string what,
const CNSPreciseTime curr 
)
private

◆ x_UpdateClientPassedChecks()

void CNetScheduleHandler::x_UpdateClientPassedChecks ( CQueue q)
private

◆ x_WorkerNodeCommand()

bool CNetScheduleHandler::x_WorkerNodeCommand ( void  ) const
private

◆ x_WriteMessage()

EIO_Status CNetScheduleHandler::x_WriteMessage ( const string msg)
private

Definition at line 920 of file ns_handler.cpp.

References SErrorEmulatorParameter::as_bool, CServer::CloseConnection(), CNSPreciseTime::Current(), eIO_Success, CNetScheduleServer::GetDebugConnDropAfterWrite(), IServer_ConnectionHandler::GetSocket(), SErrorEmulatorParameter::IsActive(), m_ConnContext, m_MsgBuffer, m_Server, CRef< C, Locker >::NotNull(), NULL, result, CSocket::Write(), x_HandleSocketErrorOnResponse(), and x_PrepareWriteBuffer().

Referenced by OnMessage(), x_CmdNotImplemented(), x_CmdObsolete(), x_FinalizeReadCommand(), x_OnCmdParserError(), x_PrintGetJobResponse(), x_ProcessAckAlert(), x_ProcessActiveCount(), x_ProcessBatchSequenceEnd(), x_ProcessCancel(), x_ProcessCancelQueue(), x_ProcessCancelWaitGet(), x_ProcessCancelWaitRead(), x_ProcessChangeAffinity(), x_ProcessClearWorkerNode(), x_ProcessCreateDynamicQueue(), x_ProcessDeleteDynamicQueue(), x_ProcessDropQueue(), x_ProcessDump(), x_ProcessFastStatusS(), x_ProcessFastStatusW(), x_ProcessGetConf(), x_ProcessGetConfiguration(), x_ProcessGetJob(), x_ProcessGetMessage(), x_ProcessGetParam(), x_ProcessHealth(), x_ProcessJobDelayExpiration(), x_ProcessJobDelayReadExpiration(), x_ProcessJobExchange(), x_ProcessListenJob(), x_ProcessMsgBatchHeader(), x_ProcessMsgBatchJob(), x_ProcessMsgBatchSubmit(), x_ProcessMsgQueue(), x_ProcessPause(), x_ProcessPut(), x_ProcessPutFailure(), x_ProcessPutMessage(), x_ProcessQList(), x_ProcessQueueInfo(), x_ProcessReading(), x_ProcessRedo(), x_ProcessRefuseSubmits(), x_ProcessReloadConfig(), x_ProcessReread(), x_ProcessReschedule(), x_ProcessResume(), x_ProcessReturn(), x_ProcessSetAffinity(), x_ProcessSetClientData(), x_ProcessSetQueue(), x_ProcessSetScope(), x_ProcessShutdown(), x_ProcessStatistics(), x_ProcessStatus(), x_ProcessSubmit(), x_ProcessSubmitBatch(), x_ProcessVersion(), and x_StatisticsNew().

Member Data Documentation

◆ m_BatchClientIP

string CNetScheduleHandler::m_BatchClientIP
private

Definition at line 295 of file ns_handler.hpp.

Referenced by x_ProcessMsgBatchJob(), and x_ProcessSubmitBatch().

◆ m_BatchClientSID

string CNetScheduleHandler::m_BatchClientSID
private

Definition at line 296 of file ns_handler.hpp.

Referenced by x_ProcessMsgBatchJob(), and x_ProcessSubmitBatch().

◆ m_BatchEndParser

TProtoParser CNetScheduleHandler::m_BatchEndParser
private

Definition at line 305 of file ns_handler.hpp.

Referenced by x_ProcessMsgBatchJob(), and x_ProcessMsgBatchSubmit().

◆ m_BatchGroup

string CNetScheduleHandler::m_BatchGroup
private

Definition at line 292 of file ns_handler.hpp.

Referenced by x_ProcessMsgBatchSubmit(), and x_ProcessSubmitBatch().

◆ m_BatchHeaderParser

TProtoParser CNetScheduleHandler::m_BatchHeaderParser
private

Definition at line 303 of file ns_handler.hpp.

Referenced by x_ProcessMsgBatchHeader().

◆ m_BatchJobs

vector< pair<CJob, string> > CNetScheduleHandler::m_BatchJobs
private

◆ m_BatchNCBIPHID

string CNetScheduleHandler::m_BatchNCBIPHID
private

Definition at line 297 of file ns_handler.hpp.

Referenced by x_ProcessMsgBatchJob(), and x_ProcessSubmitBatch().

◆ m_BatchPos

unsigned CNetScheduleHandler::m_BatchPos
private

Definition at line 289 of file ns_handler.hpp.

Referenced by x_ProcessBatchStart(), and x_ProcessMsgBatchJob().

◆ m_BatchSize

unsigned CNetScheduleHandler::m_BatchSize
private

◆ m_BatchStopWatch

CStopWatch CNetScheduleHandler::m_BatchStopWatch
private

Definition at line 290 of file ns_handler.hpp.

Referenced by x_ProcessBatchStart(), and x_ProcessMsgBatchSubmit().

◆ m_BatchSubmPort

unsigned CNetScheduleHandler::m_BatchSubmPort
private

Definition at line 293 of file ns_handler.hpp.

Referenced by x_ProcessMsgBatchJob(), and x_ProcessSubmitBatch().

◆ m_BatchSubmTimeout

CNSPreciseTime CNetScheduleHandler::m_BatchSubmTimeout
private

Definition at line 294 of file ns_handler.hpp.

Referenced by x_ProcessMsgBatchJob(), and x_ProcessSubmitBatch().

◆ m_ClientId

CNSClientId CNetScheduleHandler::m_ClientId
private

◆ m_ClientIdentificationPrinted

bool CNetScheduleHandler::m_ClientIdentificationPrinted
private

◆ m_CmdContext

CRef<CRequestContext> CNetScheduleHandler::m_CmdContext
private

◆ m_CommandArguments

SNSCommandArguments CNetScheduleHandler::m_CommandArguments
private

◆ m_ConnContext

CRef<CRequestContext> CNetScheduleHandler::m_ConnContext
private

◆ m_MsgBuffer

char* CNetScheduleHandler::m_MsgBuffer
private

Definition at line 274 of file ns_handler.hpp.

Referenced by x_PrepareWriteBuffer(), x_WriteMessage(), and ~CNetScheduleHandler().

◆ m_MsgBufferSize

size_t CNetScheduleHandler::m_MsgBufferSize
private

Definition at line 273 of file ns_handler.hpp.

Referenced by x_PrepareWriteBuffer().

◆ m_ProcessMessage

void(CNetScheduleHandler::* CNetScheduleHandler::m_ProcessMessage) (BUF buffer)
private

◆ m_QueueName

string CNetScheduleHandler::m_QueueName
private

◆ m_QueueRef

CWeakRef<CQueue> CNetScheduleHandler::m_QueueRef
private

Definition at line 281 of file ns_handler.hpp.

Referenced by GetQueue(), x_ProcessMsgQueue(), and x_ProcessSetQueue().

◆ m_RawAuthString

string CNetScheduleHandler::m_RawAuthString
private

Definition at line 276 of file ns_handler.hpp.

Referenced by x_ProcessMsgAuth(), and x_ProcessMsgQueue().

◆ m_RollbackAction

CNSRollbackInterface* CNetScheduleHandler::m_RollbackAction
private

◆ m_Server

CNetScheduleServer* CNetScheduleHandler::m_Server
private

◆ m_SingleCmdParser

TProtoParser CNetScheduleHandler::m_SingleCmdParser
private

Definition at line 301 of file ns_handler.hpp.

Referenced by x_ProcessMsgQueue(), and x_ProcessMsgRequest().

◆ m_WithinBatchSubmit

bool CNetScheduleHandler::m_WithinBatchSubmit
private

◆ sm_BatchEndMap

CNetScheduleHandler::SCommandMap CNetScheduleHandler::sm_BatchEndMap
staticprivate
Initial value:
= {
{ "ENDB" },
{ NULL }
}
#define NULL
Definition: ncbistd.hpp:225

Definition at line 306 of file ns_handler.hpp.

◆ sm_BatchHeaderMap

CNetScheduleHandler::SCommandMap CNetScheduleHandler::sm_BatchHeaderMap
staticprivate
Initial value:
= {
{ { "size", eNSPT_Int, eNSPA_Required } } },
{ NULL }
}
void x_ProcessBatchSequenceEnd(CQueue *)
void x_ProcessBatchStart(CQueue *)
@ eNS_Submitter
Definition: ns_access.hpp:44
@ eNS_Queue
Definition: ns_access.hpp:42
@ eNS_Program
Definition: ns_access.hpp:46

Definition at line 304 of file ns_handler.hpp.

◆ sm_CommandMap

CNetScheduleHandler::SCommandMap CNetScheduleHandler::sm_CommandMap
staticprivate

Definition at line 302 of file ns_handler.hpp.


The documentation for this class was generated from the following files:
Modified on Wed Apr 17 13:09:37 2024 by modify_doxy.py rev. 669887