NCBI C++ ToolKit
Classes | Public Member Functions | Protected Attributes | Private Attributes | List of all members
CJobContextProcessWatcher Class Reference

Search Toolkit Book for CJobContextProcessWatcher

+ Inheritance diagram for CJobContextProcessWatcher:
+ Collaboration diagram for CJobContextProcessWatcher:

Classes

struct  SParams
 

Public Member Functions

 CJobContextProcessWatcher (SParams &p)
 
virtual EAction OnStart (TProcessHandle pid)
 This method is called when the process has just been started by the ExecWait() method. More...
 
virtual EAction Watch (TProcessHandle pid)
 This method is getting called periodically during the process execution by the ExecWait() method. More...
 
- Public Member Functions inherited from CTimedProcessWatcher
 CTimedProcessWatcher (SParams &p)
 
- Public Member Functions inherited from CPipe::IProcessWatcher
virtual ~IProcessWatcher ()
 

Protected Attributes

CWorkerNodeJobContextm_JobContext
 
- Protected Attributes inherited from CTimedProcessWatcher
CRemoteAppReaper::CScheduler & m_ProcessManager
 
const string m_ProcessType
 
const CTimer m_Deadline
 

Private Attributes

CTimer m_KeepAlive
 
CRemoteAppTimeoutReporterm_TimeoutReporter
 

Additional Inherited Members

- Public Types inherited from CPipe::IProcessWatcher
enum  EAction { eContinue , eStop , eExit }
 An action which the ExecWait() method should take after the Watch() method has returned. More...
 

Detailed Description

Definition at line 606 of file exec_helpers.cpp.

Constructor & Destructor Documentation

◆ CJobContextProcessWatcher()

CJobContextProcessWatcher::CJobContextProcessWatcher ( SParams p)
inline

Definition at line 628 of file exec_helpers.cpp.

Member Function Documentation

◆ OnStart()

virtual EAction CJobContextProcessWatcher::OnStart ( TProcessHandle  )
inlinevirtual

This method is called when the process has just been started by the ExecWait() method.

Parameters
pidProcess Id to monitor
Returns
eContinue to continue with the process; other code to kill the process and to return from ExecWait() with eCanceled

Reimplemented from CPipe::IProcessWatcher.

Definition at line 635 of file exec_helpers.cpp.

References CNetScheduleAdmin::eShutdownImmediate, CPipe::IProcessWatcher::eStop, CWorkerNodeJobContext::GetShutdownLevel(), LOG_POST, m_JobContext, Note, CPipe::IProcessWatcher::OnStart(), and NStr::UInt8ToString().

◆ Watch()

virtual EAction CJobContextProcessWatcher::Watch ( TProcessHandle  )
inlinevirtual

This method is getting called periodically during the process execution by the ExecWait() method.

Parameters
pidProcess Id to monitor
Returns
eContinue to keep the process running; eStop to kill the process; or eExit to bail from ExecWait() with eCanceled (the process is not killed, but all I/O is severed with it)

Reimplemented from CTimedProcessWatcher.

Reimplemented in CMonitoredProcessWatcher.

Definition at line 647 of file exec_helpers.cpp.

References CPipe::IProcessWatcher::eContinue, CNetScheduleAdmin::eShutdownImmediate, CPipe::IProcessWatcher::eStop, CWorkerNodeJobContext::GetShutdownLevel(), CTimer::IsExpired(), CWorkerNodeJobContext::JobDelayExpiration(), CTimedProcessWatcher::m_Deadline, m_JobContext, m_KeepAlive, m_TimeoutReporter, CTimer::PresetSeconds(), CRemoteAppTimeoutReporter::Report(), CTimer::Restart(), CWorkerNodeJobContext::ReturnJob(), and CTimedProcessWatcher::Watch().

Referenced by CMonitoredProcessWatcher::Watch().

Member Data Documentation

◆ m_JobContext

CWorkerNodeJobContext& CJobContextProcessWatcher::m_JobContext
protected

◆ m_KeepAlive

CTimer CJobContextProcessWatcher::m_KeepAlive
private

Definition at line 674 of file exec_helpers.cpp.

Referenced by Watch().

◆ m_TimeoutReporter

CRemoteAppTimeoutReporter& CJobContextProcessWatcher::m_TimeoutReporter
private

Definition at line 675 of file exec_helpers.cpp.

Referenced by Watch().


The documentation for this class was generated from the following file:
Modified on Mon Mar 04 05:10:10 2024 by modify_doxy.py rev. 669887