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
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 )

Member Function Documentation

◆ GetExitCode()

int CGridGlobals::GetExitCode ( void  ) const

Definition at line 140 of file grid_globals.hpp.

References m_ExitCode.

Referenced by SGridWorkerNodeImpl::x_WNCleanUp().

◆ GetInstance()

CGridGlobals & CGridGlobals::GetInstance ( )

◆ 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  )

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

Definition at line 144 of file grid_globals.hpp.

References m_StartTime.

Referenced by CWNJobWatcher::Print().

◆ InterruptUDPPortListening()

void CGridGlobals::InterruptUDPPortListening ( )

◆ IsShuttingDown()

bool CGridGlobals::IsShuttingDown ( )

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 )

◆ RequestShutdown() [1/2]

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

◆ RequestShutdown() [2/2]

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

Definition at line 125 of file grid_globals.hpp.

References InterruptUDPPortListening(), m_ExitCode, and m_ShutdownLevel.

◆ ReuseJobObject()

bool CGridGlobals::ReuseJobObject ( ) const

Definition at line 114 of file grid_globals.hpp.

References m_ReuseJobObject.

◆ SetExitCode()

void CGridGlobals::SetExitCode ( int  exit_code)

Definition at line 139 of file grid_globals.hpp.

References m_ExitCode.

◆ SetReuseJobObject()

void CGridGlobals::SetReuseJobObject ( bool  value)

◆ SetUDPPort()

void CGridGlobals::SetUDPPort ( unsigned short  udp_port)

Definition at line 117 of file grid_globals.hpp.

References m_UDPPort.

Referenced by SGridWorkerNodeImpl::Run().

◆ SetWorker()

void CGridGlobals::SetWorker ( SGridWorkerNodeImpl worker)

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

Definition at line 155 of file grid_globals.hpp.

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

◆ m_JobsStarted

CAtomicCounter_WithAutoInit CGridGlobals::m_JobsStarted

Definition at line 151 of file grid_globals.hpp.

Referenced by GetNewJobNumber().

◆ m_JobWatcher

unique_ptr<CWNJobWatcher> CGridGlobals::m_JobWatcher

Definition at line 156 of file grid_globals.hpp.

Referenced by GetJobWatcher().

◆ m_ReuseJobObject

bool CGridGlobals::m_ReuseJobObject

Definition at line 152 of file grid_globals.hpp.

Referenced by ReuseJobObject(), and SetReuseJobObject().

◆ m_ShutdownLevel

volatile CNetScheduleAdmin::EShutdownLevel CGridGlobals::m_ShutdownLevel

Definition at line 154 of file grid_globals.hpp.

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

◆ m_StartTime

const CTime CGridGlobals::m_StartTime

Definition at line 157 of file grid_globals.hpp.

Referenced by GetStartTime().

◆ m_UDPPort

unsigned short CGridGlobals::m_UDPPort

Definition at line 159 of file grid_globals.hpp.

Referenced by InterruptUDPPortListening(), and SetUDPPort().

◆ m_Worker

SGridWorkerNodeImpl* CGridGlobals::m_Worker

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 rev. 669887