NCBI C++ ToolKit
|
Search Toolkit Book for CGridGlobals
#include <connect/services/grid_globals.hpp>
Public Member Functions | |
CGridGlobals () | |
~CGridGlobals () | |
unsigned int | GetNewJobNumber () |
bool | ReuseJobObject () const |
void | SetReuseJobObject (bool value) |
void | SetWorker (SGridWorkerNodeImpl *worker) |
void | SetUDPPort (unsigned short udp_port) |
void | RequestShutdown (CNetScheduleAdmin::EShutdownLevel level) |
Request node shutdown. More... | |
void | RequestShutdown (CNetScheduleAdmin::EShutdownLevel level, int exit_code) |
bool | IsShuttingDown () |
CNetScheduleAdmin::EShutdownLevel | GetShutdownLevel (void) |
Check if shutdown was requested. More... | |
void | SetExitCode (int exit_code) |
int | GetExitCode () const |
CWNJobWatcher & | GetJobWatcher () |
const CTime & | GetStartTime () const |
void | KillNode () |
void | InterruptUDPPortListening () |
Static Public Member Functions | |
static CGridGlobals & | GetInstance () |
Private Member Functions | |
CGridGlobals (const CGridGlobals &) | |
CGridGlobals & | operator= (const CGridGlobals &) |
Private Attributes | |
CAtomicCounter_WithAutoInit | m_JobsStarted |
bool | m_ReuseJobObject |
volatile CNetScheduleAdmin::EShutdownLevel | m_ShutdownLevel |
volatile int | m_ExitCode |
unique_ptr< CWNJobWatcher > | m_JobWatcher |
const CTime | m_StartTime |
SGridWorkerNodeImpl * | m_Worker |
unsigned short | m_UDPPort |
Definition at line 104 of file grid_globals.hpp.
CGridGlobals::CGridGlobals | ( | ) |
Definition at line 206 of file grid_globals.cpp.
CGridGlobals::~CGridGlobals | ( | ) |
Definition at line 216 of file grid_globals.cpp.
|
private |
|
inline |
Definition at line 140 of file grid_globals.hpp.
References m_ExitCode.
Referenced by SGridWorkerNodeImpl::x_WNCleanUp().
|
static |
Definition at line 221 of file grid_globals.cpp.
References CSafeStatic< T, Callbacks >::Get().
Referenced by CWNJobWatcher::CheckForInfiniteLoop(), CMainLoopThread::CImpl::CheckState(), CRemoteAppJob::CRemoteAppJob(), CRemoteCgiJob::CRemoteCgiJob(), SGridWorkerNodeImpl::GetJobProcessor(), SWorkerNodeJobContextImpl::GetShutdownLevel(), SOfflineJobContextImpl::GetShutdownLevel(), CMainLoopThread::Main(), CWorkerNodeIdleThread::Main(), CWNJobWatcher::Notify(), SGridWorkerNodeImpl::OfflineRun(), CGridControlThread::OnExit(), CWNJobWatcher::Print(), CGetStatisticsProcessor::Process(), CGetLoadProcessor::Process(), CShutdownProcessor::Process(), CWorkerNodeControlServer::ProcessTimeout(), CWorkerNodeIdleTaskContext::RequestShutdown(), CGridWorkerNode::RequestShutdown(), SWorkerNodeJobContextImpl::ResetJobContext(), SSuspendResume::Resume(), SGridWorkerNodeImpl::Run(), SSuspendResume::Suspend(), CMainLoopThread::x_GetNextJob(), SWorkerNodeJobContextImpl::x_RunJob(), SGridWorkerNodeImpl::x_StartWorkerThreads(), SGridWorkerNodeImpl::x_WNCleanUp(), and SGridWorkerNodeImpl::x_WNCoreInit().
CWNJobWatcher & CGridGlobals::GetJobWatcher | ( | ) |
Definition at line 234 of file grid_globals.cpp.
References m_JobWatcher.
Referenced by KillNode(), CGetStatisticsProcessor::Process(), CGetLoadProcessor::Process(), CWorkerNodeControlServer::ProcessTimeout(), and SGridWorkerNodeImpl::Run().
unsigned int CGridGlobals::GetNewJobNumber | ( | ) |
Definition at line 229 of file grid_globals.cpp.
References CAtomicCounter::Add(), and m_JobsStarted.
Referenced by SWorkerNodeJobContextImpl::ResetJobContext().
|
inline |
Check if shutdown was requested.
Definition at line 136 of file grid_globals.hpp.
References m_ShutdownLevel.
Referenced by SWorkerNodeJobContextImpl::GetShutdownLevel(), and SOfflineJobContextImpl::GetShutdownLevel().
Definition at line 144 of file grid_globals.hpp.
References m_StartTime.
Referenced by CWNJobWatcher::Print().
void CGridGlobals::InterruptUDPPortListening | ( | ) |
Definition at line 248 of file grid_globals.cpp.
References m_UDPPort, and CDatagramSocket::Send().
Referenced by RequestShutdown(), SSuspendResume::Resume(), and SSuspendResume::Suspend().
|
inline |
Definition at line 165 of file grid_globals.hpp.
References CNetScheduleAdmin::eNoShutdown, and m_ShutdownLevel.
void CGridGlobals::KillNode | ( | ) |
Definition at line 241 of file grid_globals.cpp.
References _ASSERT, GetJobWatcher(), m_Worker, and CWNJobWatcher::x_KillNode().
Referenced by CWNJobWatcher::CheckForInfiniteLoop(), and CShutdownProcessor::Process().
|
private |
|
inline |
Request node shutdown.
Definition at line 120 of file grid_globals.hpp.
References InterruptUDPPortListening(), and m_ShutdownLevel.
Referenced by SGridWorkerNodeImpl::GetJobProcessor(), CMainLoopThread::Main(), CWorkerNodeIdleThread::Main(), SGridWorkerNodeImpl::OfflineRun(), CGridControlThread::OnExit(), CShutdownProcessor::Process(), and SGridWorkerNodeImpl::x_StartWorkerThreads().
|
inline |
Definition at line 125 of file grid_globals.hpp.
References InterruptUDPPortListening(), m_ExitCode, and m_ShutdownLevel.
|
inline |
Definition at line 114 of file grid_globals.hpp.
References m_ReuseJobObject.
|
inline |
Definition at line 139 of file grid_globals.hpp.
References m_ExitCode.
|
inline |
Definition at line 115 of file grid_globals.hpp.
References m_ReuseJobObject, and rapidjson::value.
Referenced by CRemoteAppJob::CRemoteAppJob(), CRemoteCgiJob::CRemoteCgiJob(), and SGridWorkerNodeImpl::x_WNCoreInit().
|
inline |
Definition at line 117 of file grid_globals.hpp.
References m_UDPPort.
Referenced by SGridWorkerNodeImpl::Run().
|
inline |
Definition at line 116 of file grid_globals.hpp.
References m_Worker.
Referenced by SGridWorkerNodeImpl::x_WNCoreInit().
|
private |
Definition at line 155 of file grid_globals.hpp.
Referenced by GetExitCode(), RequestShutdown(), and SetExitCode().
|
private |
Definition at line 151 of file grid_globals.hpp.
Referenced by GetNewJobNumber().
|
private |
Definition at line 156 of file grid_globals.hpp.
Referenced by GetJobWatcher().
|
private |
Definition at line 152 of file grid_globals.hpp.
Referenced by ReuseJobObject(), and SetReuseJobObject().
|
private |
Definition at line 154 of file grid_globals.hpp.
Referenced by GetShutdownLevel(), IsShuttingDown(), and RequestShutdown().
Definition at line 157 of file grid_globals.hpp.
Referenced by GetStartTime().
|
private |
Definition at line 159 of file grid_globals.hpp.
Referenced by InterruptUDPPortListening(), and SetUDPPort().
|
private |
Definition at line 158 of file grid_globals.hpp.
Referenced by KillNode(), and SetWorker().