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

Search Toolkit Book for CGridGlobals

#include <connect/services/grid_globals.hpp>

+ Collaboration diagram for CGridGlobals:

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
 
CWNJobWatcherGetJobWatcher ()
 
const CTimeGetStartTime () const
 
void KillNode ()
 
void InterruptUDPPortListening ()
 

Static Public Member Functions

static CGridGlobalsGetInstance ()
 

Private Member Functions

 CGridGlobals (const CGridGlobals &)
 
CGridGlobalsoperator= (const CGridGlobals &)
 

Private Attributes

CAtomicCounter_WithAutoInit m_JobsStarted
 
bool m_ReuseJobObject
 
volatile CNetScheduleAdmin::EShutdownLevel m_ShutdownLevel
 
volatile int m_ExitCode
 
unique_ptr< CWNJobWatcherm_JobWatcher
 
const CTime m_StartTime
 
SGridWorkerNodeImplm_Worker
 
unsigned short m_UDPPort
 

Detailed Description

Definition at line 104 of file grid_globals.hpp.

Constructor & Destructor Documentation

◆ CGridGlobals() [1/2]

CGridGlobals::CGridGlobals ( )

Definition at line 206 of file grid_globals.cpp.

◆ ~CGridGlobals()

CGridGlobals::~CGridGlobals ( )

Definition at line 216 of file grid_globals.cpp.

◆ CGridGlobals() [2/2]

CGridGlobals::CGridGlobals ( const CGridGlobals )
private

Member Function Documentation

◆ GetExitCode()

int CGridGlobals::GetExitCode ( void  ) const
inline

Definition at line 140 of file grid_globals.hpp.

References m_ExitCode.

Referenced by SGridWorkerNodeImpl::x_WNCleanUp().

◆ GetInstance()

CGridGlobals & CGridGlobals::GetInstance ( )
static

◆ GetJobWatcher()

CWNJobWatcher & CGridGlobals::GetJobWatcher ( )

◆ GetNewJobNumber()

unsigned int CGridGlobals::GetNewJobNumber ( )

Definition at line 229 of file grid_globals.cpp.

References CAtomicCounter::Add(), and m_JobsStarted.

Referenced by SWorkerNodeJobContextImpl::ResetJobContext().

◆ GetShutdownLevel()

CNetScheduleAdmin::EShutdownLevel CGridGlobals::GetShutdownLevel ( void  )
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().

◆ GetStartTime()

const CTime& CGridGlobals::GetStartTime ( ) const
inline

Definition at line 144 of file grid_globals.hpp.

References m_StartTime.

Referenced by CWNJobWatcher::Print().

◆ InterruptUDPPortListening()

void CGridGlobals::InterruptUDPPortListening ( )

◆ IsShuttingDown()

bool CGridGlobals::IsShuttingDown ( )
inline

Definition at line 165 of file grid_globals.hpp.

References CNetScheduleAdmin::eNoShutdown, and m_ShutdownLevel.

◆ KillNode()

void CGridGlobals::KillNode ( )

◆ operator=()

CGridGlobals& CGridGlobals::operator= ( const CGridGlobals )
private

◆ RequestShutdown() [1/2]

void CGridGlobals::RequestShutdown ( CNetScheduleAdmin::EShutdownLevel  level)
inline

◆ RequestShutdown() [2/2]

void CGridGlobals::RequestShutdown ( CNetScheduleAdmin::EShutdownLevel  level,
int  exit_code 
)
inline

Definition at line 125 of file grid_globals.hpp.

References InterruptUDPPortListening(), m_ExitCode, and m_ShutdownLevel.

◆ ReuseJobObject()

bool CGridGlobals::ReuseJobObject ( ) const
inline

Definition at line 114 of file grid_globals.hpp.

References m_ReuseJobObject.

◆ SetExitCode()

void CGridGlobals::SetExitCode ( int  exit_code)
inline

Definition at line 139 of file grid_globals.hpp.

References m_ExitCode.

◆ SetReuseJobObject()

void CGridGlobals::SetReuseJobObject ( bool  value)
inline

◆ SetUDPPort()

void CGridGlobals::SetUDPPort ( unsigned short  udp_port)
inline

Definition at line 117 of file grid_globals.hpp.

References m_UDPPort.

Referenced by SGridWorkerNodeImpl::Run().

◆ SetWorker()

void CGridGlobals::SetWorker ( SGridWorkerNodeImpl worker)
inline

Definition at line 116 of file grid_globals.hpp.

References m_Worker.

Referenced by SGridWorkerNodeImpl::x_WNCoreInit().

Member Data Documentation

◆ m_ExitCode

volatile int CGridGlobals::m_ExitCode
private

Definition at line 155 of file grid_globals.hpp.

Referenced by GetExitCode(), RequestShutdown(), and SetExitCode().

◆ m_JobsStarted

CAtomicCounter_WithAutoInit CGridGlobals::m_JobsStarted
private

Definition at line 151 of file grid_globals.hpp.

Referenced by GetNewJobNumber().

◆ m_JobWatcher

unique_ptr<CWNJobWatcher> CGridGlobals::m_JobWatcher
private

Definition at line 156 of file grid_globals.hpp.

Referenced by GetJobWatcher().

◆ m_ReuseJobObject

bool CGridGlobals::m_ReuseJobObject
private

Definition at line 152 of file grid_globals.hpp.

Referenced by ReuseJobObject(), and SetReuseJobObject().

◆ m_ShutdownLevel

volatile CNetScheduleAdmin::EShutdownLevel CGridGlobals::m_ShutdownLevel
private

Definition at line 154 of file grid_globals.hpp.

Referenced by GetShutdownLevel(), IsShuttingDown(), and RequestShutdown().

◆ m_StartTime

const CTime CGridGlobals::m_StartTime
private

Definition at line 157 of file grid_globals.hpp.

Referenced by GetStartTime().

◆ m_UDPPort

unsigned short CGridGlobals::m_UDPPort
private

Definition at line 159 of file grid_globals.hpp.

Referenced by InterruptUDPPortListening(), and SetUDPPort().

◆ m_Worker

SGridWorkerNodeImpl* CGridGlobals::m_Worker
private

Definition at line 158 of file grid_globals.hpp.

Referenced by KillNode(), and SetWorker().


The documentation for this class was generated from the following files:
Modified on Sun Mar 03 03:12:29 2024 by modify_doxy.py rev. 669887