NCBI C++ ToolKit
Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
SSuspendResume Struct Reference

Search Toolkit Book for SSuspendResume

#include "grid_worker_impl.hpp"
(Private to src/connect/services.)

+ Collaboration diagram for SSuspendResume:

Public Types

enum  EState { eRunning , eSuspending , eSuspended }
 

Public Member Functions

 SSuspendResume ()
 
void Suspend (bool pullback, unsigned timeout)
 
void Resume () volatile
 
void SetJobPullbackTimer (unsigned seconds)
 
bool IsJobPullbackTimerExpired ()
 
EState CheckState () volatile
 
bool IsSuspended () const volatile
 
unsigned GetCurrentJobGeneration () const volatile
 
unsigned GetDefaultPullbackTimeout () const
 
void SetDefaultPullbackTimeout (unsigned seconds)
 

Private Types

enum  EEvent { eNoEvent , eSuspend , eResume }
 

Private Attributes

atomic< EEventm_Event
 
atomic< boolm_IsSuspended
 
atomic< unsigned > m_CurrentJobGeneration
 
unsigned m_DefaultPullbackTimeout = 0
 
CDeadline m_JobPullbackTime = 0
 

Detailed Description

Definition at line 157 of file grid_worker_impl.hpp.

Member Enumeration Documentation

◆ EEvent

enum SSuspendResume::EEvent
private
Enumerator
eNoEvent 
eSuspend 
eResume 

Definition at line 174 of file grid_worker_impl.hpp.

◆ EState

Enumerator
eRunning 
eSuspending 
eSuspended 

Definition at line 166 of file grid_worker_impl.hpp.

Constructor & Destructor Documentation

◆ SSuspendResume()

SSuspendResume::SSuspendResume ( )
inline

Definition at line 159 of file grid_worker_impl.hpp.

Member Function Documentation

◆ CheckState()

SSuspendResume::EState SSuspendResume::CheckState ( void  ) volatile

◆ GetCurrentJobGeneration()

unsigned SSuspendResume::GetCurrentJobGeneration ( ) const volatile
inline

◆ GetDefaultPullbackTimeout()

unsigned SSuspendResume::GetDefaultPullbackTimeout ( ) const
inline

Definition at line 170 of file grid_worker_impl.hpp.

References m_DefaultPullbackTimeout.

◆ IsJobPullbackTimerExpired()

bool SSuspendResume::IsJobPullbackTimerExpired ( )

Definition at line 446 of file grid_worker.cpp.

References CDeadline::IsExpired(), and m_JobPullbackTime.

◆ IsSuspended()

bool SSuspendResume::IsSuspended ( ) const volatile
inline

Definition at line 168 of file grid_worker_impl.hpp.

References m_IsSuspended.

◆ Resume()

void SSuspendResume::Resume ( ) volatile

◆ SetDefaultPullbackTimeout()

void SSuspendResume::SetDefaultPullbackTimeout ( unsigned  seconds)
inline

Definition at line 171 of file grid_worker_impl.hpp.

References m_DefaultPullbackTimeout.

◆ SetJobPullbackTimer()

void SSuspendResume::SetJobPullbackTimer ( unsigned  seconds)

Definition at line 440 of file grid_worker.cpp.

References m_CurrentJobGeneration, and m_JobPullbackTime.

Referenced by Suspend().

◆ Suspend()

void SSuspendResume::Suspend ( bool  pullback,
unsigned  timeout 
)

Member Data Documentation

◆ m_CurrentJobGeneration

atomic<unsigned> SSuspendResume::m_CurrentJobGeneration
private

Definition at line 177 of file grid_worker_impl.hpp.

Referenced by GetCurrentJobGeneration(), and SetJobPullbackTimer().

◆ m_DefaultPullbackTimeout

unsigned SSuspendResume::m_DefaultPullbackTimeout = 0
private

Definition at line 178 of file grid_worker_impl.hpp.

Referenced by GetDefaultPullbackTimeout(), and SetDefaultPullbackTimeout().

◆ m_Event

atomic<EEvent> SSuspendResume::m_Event
private

Definition at line 175 of file grid_worker_impl.hpp.

Referenced by CheckState(), Resume(), and Suspend().

◆ m_IsSuspended

atomic<bool> SSuspendResume::m_IsSuspended
private

Definition at line 176 of file grid_worker_impl.hpp.

Referenced by CheckState(), and IsSuspended().

◆ m_JobPullbackTime

CDeadline SSuspendResume::m_JobPullbackTime = 0
private

Definition at line 179 of file grid_worker_impl.hpp.

Referenced by IsJobPullbackTimerExpired(), and SetJobPullbackTimer().


The documentation for this struct was generated from the following files:
Modified on Sat Apr 20 12:14:45 2024 by modify_doxy.py rev. 669887