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

Search Toolkit Book for SNetScheduleAPIImpl

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

+ Inheritance diagram for SNetScheduleAPIImpl:
+ Collaboration diagram for SNetScheduleAPIImpl:

Classes

struct  SServerParamsSync
 

Public Types

typedef CNetScheduleAPI::TQueueParams TQueueParams
 
typedef map< string, stringTAuthParams
 
- Public Types inherited from CObject
enum  EAllocFillMode { eAllocFillNone = 1 , eAllocFillZero , eAllocFillPattern }
 Control filling of newly allocated memory. More...
 
typedef CObjectCounterLocker TLockerType
 Default locker type for CRef. More...
 
typedef atomic< Uint8TCounter
 Counter type is CAtomiCounter. More...
 
typedef Uint8 TCount
 Alias for value type of counter. More...
 

Public Member Functions

 SNetScheduleAPIImpl (CSynRegistryBuilder registry_builder, const string &section, const string &service_name=kEmptyStr, const string &client_name=kEmptyStr, const string &queue_name=kEmptyStr, bool wn=false, bool try_config=true)
 
 SNetScheduleAPIImpl (SNetServerInPool *server, SNetScheduleAPIImpl *parent)
 
 ~SNetScheduleAPIImpl ()
 
CNetScheduleServerListenerGetListener ()
 
CNetScheduleAPI::EJobStatus GetJobStatus (string cmd, const CNetScheduleJob &job, time_t *job_exptime, ENetScheduleQueuePauseMode *pause_mode)
 
const CNetScheduleAPI::SServerParamsGetServerParams ()
 
void GetQueueParams (const string &queue_name, TQueueParams &queue_params)
 
void GetQueueParams (TQueueParams &queue_params)
 
CNetServer GetServer (const string &job_key)
 
CNetServer GetServer (const CNetScheduleJob &job)
 
template<class TJob >
string ExecOnJobServer (const TJob &job, const string &cmd, ESwitch roe=eDefault)
 
bool GetServerByNode (const string &ns_node, CNetServer *server)
 
void AllocNotificationThread ()
 
void StartNotificationThread ()
 
void x_ClearNode ()
 
void UpdateAuthString ()
 
void UseOldStyleAuth ()
 
void SetAuthParam (const string &param_name, const string &param_value)
 
CCompoundIDPool GetCompoundIDPool ()
 
void Init (CSynRegistry &registry, SRegSynonyms &sections)
 
void InitAffinities (CSynRegistry &registry, const SRegSynonyms &sections)
 
string MakeAuthString ()
 
- Public Member Functions inherited from CObject
 CObject (void)
 Constructor. More...
 
 CObject (const CObject &src)
 Copy constructor. More...
 
virtual ~CObject (void)
 Destructor. More...
 
CObjectoperator= (const CObject &src) THROWS_NONE
 Assignment operator. More...
 
bool CanBeDeleted (void) const THROWS_NONE
 Check if object can be deleted. More...
 
bool IsAllocatedInPool (void) const THROWS_NONE
 Check if object is allocated in memory pool (not system heap) More...
 
bool Referenced (void) const THROWS_NONE
 Check if object is referenced. More...
 
bool ReferencedOnlyOnce (void) const THROWS_NONE
 Check if object is referenced only once. More...
 
void AddReference (void) const
 Add reference to object. More...
 
void RemoveReference (void) const
 Remove reference to object. More...
 
void ReleaseReference (void) const
 Remove reference without deleting object. More...
 
virtual void DoNotDeleteThisObject (void)
 Mark this object as not allocated in heap – do not delete this object. More...
 
virtual void DoDeleteThisObject (void)
 Mark this object as allocated in heap – object can be deleted. More...
 
void * operator new (size_t size)
 Define new operator for memory allocation. More...
 
void * operator new[] (size_t size)
 Define new[] operator for 'array' memory allocation. More...
 
void operator delete (void *ptr)
 Define delete operator for memory deallocation. More...
 
void operator delete[] (void *ptr)
 Define delete[] operator for memory deallocation. More...
 
void * operator new (size_t size, void *place)
 Define new operator. More...
 
void operator delete (void *ptr, void *place)
 Define delete operator. More...
 
void * operator new (size_t size, CObjectMemoryPool *place)
 Define new operator using memory pool. More...
 
void operator delete (void *ptr, CObjectMemoryPool *place)
 Define delete operator. More...
 
virtual void DebugDump (CDebugDumpContext ddc, unsigned int depth) const
 Define method for dumping debug information. More...
 
- Public Member Functions inherited from CDebugDumpable
 CDebugDumpable (void)
 
virtual ~CDebugDumpable (void)
 
void DebugDumpText (ostream &out, const string &bundle, unsigned int depth) const
 
void DebugDumpFormat (CDebugDumpFormatter &ddf, const string &bundle, unsigned int depth) const
 
void DumpToConsole (void) const
 

Public Attributes

CNetScheduleAPI::EClientType m_ClientType = CNetScheduleAPI::eCT_Auto
 
CRef< SNetScheduleSharedDatam_SharedData
 
bool m_RetryOnException
 
CNetService m_Service
 
string m_Queue
 
string m_ProgramVersion
 
string m_ClientNode
 
string m_ClientSession
 
TAuthParams m_AuthParams
 
struct SNetScheduleAPIImpl::SServerParamsSync m_ServerParamsSync
 
CNetScheduleExecutor::EJobAffinityPreference m_AffinityPreference = CNetScheduleExecutor::eAnyJob
 
list< stringm_AffinityList
 
CNetScheduleGetJob::TAffinityLadder m_AffinityLadder
 
string m_JobGroup
 
unsigned m_JobTtl = 0
 
bool m_UseEmbeddedStorage
 
CCompoundIDPool m_CompoundIDPool
 
CFastMutex m_NotificationThreadMutex
 
CRef< SNetScheduleNotificationThreadm_NotificationThread
 
CAtomicCounter_WithAutoInit m_NotificationThreadStartStopCounter
 

Private Types

enum  EMode {
  fWnCompatible = (0 << 0) , fNonWnCompatible = (1 << 0) , fConfigLoading = (1 << 1) , fWorkerNode = fWnCompatible ,
  fNetSchedule = fNonWnCompatible
}
 
typedef int TMode
 

Static Private Member Functions

static TMode GetMode (bool wn, bool try_config)
 

Private Attributes

const TMode m_Mode
 

Additional Inherited Members

- Static Public Member Functions inherited from CObject
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (void)
 Define method to throw null pointer exception. More...
 
static NCBI_XNCBI_EXPORT void ThrowNullPointerException (const type_info &type)
 
static EAllocFillMode GetAllocFillMode (void)
 
static void SetAllocFillMode (EAllocFillMode mode)
 
static void SetAllocFillMode (const string &value)
 Set mode from configuration parameter value. More...
 
- Static Public Member Functions inherited from CDebugDumpable
static void EnableDebugDump (bool on)
 
- Static Public Attributes inherited from CObject
static const TCount eCounterBitsCanBeDeleted = 1 << 0
 Define possible object states. More...
 
static const TCount eCounterBitsInPlainHeap = 1 << 1
 Heap signature was found. More...
 
static const TCount eCounterBitsPlaceMask
 Mask for 'in heap' state flags. More...
 
static const int eCounterStep = 1 << 2
 Skip over the "in heap" bits. More...
 
static const TCount eCounterValid = TCount(1) << (sizeof(TCount) * 8 - 2)
 Minimal value for valid objects (reference counter is zero) Must be a single bit value. More...
 
static const TCount eCounterStateMask
 Valid object, and object in heap. More...
 
- Protected Member Functions inherited from CObject
virtual void DeleteThis (void)
 Virtual method "deleting" this object. More...
 

Detailed Description

Definition at line 285 of file netschedule_api_impl.hpp.

Member Typedef Documentation

◆ TAuthParams

Definition at line 381 of file netschedule_api_impl.hpp.

◆ TMode

Definition at line 295 of file netschedule_api_impl.hpp.

◆ TQueueParams

Definition at line 326 of file netschedule_api_impl.hpp.

Member Enumeration Documentation

◆ EMode

Enumerator
fWnCompatible 
fNonWnCompatible 
fConfigLoading 
fWorkerNode 
fNetSchedule 

Definition at line 288 of file netschedule_api_impl.hpp.

Constructor & Destructor Documentation

◆ SNetScheduleAPIImpl() [1/2]

SNetScheduleAPIImpl::SNetScheduleAPIImpl ( CSynRegistryBuilder  registry_builder,
const string section,
const string service_name = kEmptyStr,
const string client_name = kEmptyStr,
const string queue_name = kEmptyStr,
bool  wn = false,
bool  try_config = true 
)

◆ SNetScheduleAPIImpl() [2/2]

SNetScheduleAPIImpl::SNetScheduleAPIImpl ( SNetServerInPool server,
SNetScheduleAPIImpl parent 
)

Definition at line 726 of file netschedule_api.cpp.

◆ ~SNetScheduleAPIImpl()

SNetScheduleAPIImpl::~SNetScheduleAPIImpl ( )

Member Function Documentation

◆ AllocNotificationThread()

void SNetScheduleAPIImpl::AllocNotificationThread ( )

Definition at line 319 of file netschedule_api.cpp.

References m_NotificationThread, m_NotificationThreadMutex, and NULL.

◆ ExecOnJobServer()

template<class TJob >
string SNetScheduleAPIImpl::ExecOnJobServer ( const TJob &  job,
const string cmd,
ESwitch  roe = eDefault 
)
inline

Definition at line 342 of file netschedule_api_impl.hpp.

References cmd, eDefault, and eOn.

Referenced by GetJobStatus(), and CNetScheduleNotificationHandler::RequestJobWatching().

◆ GetCompoundIDPool()

CCompoundIDPool SNetScheduleAPIImpl::GetCompoundIDPool ( void  )
inline

Definition at line 362 of file netschedule_api_impl.hpp.

Referenced by SGridWorkerNodeImpl::OfflineRun().

◆ GetJobStatus()

CNetScheduleAPI::EJobStatus SNetScheduleAPIImpl::GetJobStatus ( string  cmd,
const CNetScheduleJob job,
time_t *  job_exptime,
ENetScheduleQueuePauseMode pause_mode 
)

◆ GetListener()

CNetScheduleServerListener* SNetScheduleAPIImpl::GetListener ( void  )
inline

◆ GetMode()

static TMode SNetScheduleAPIImpl::GetMode ( bool  wn,
bool  try_config 
)
inlinestaticprivate

Definition at line 297 of file netschedule_api_impl.hpp.

◆ GetQueueParams() [1/2]

void SNetScheduleAPIImpl::GetQueueParams ( const string queue_name,
TQueueParams queue_params 
)

◆ GetQueueParams() [2/2]

void SNetScheduleAPIImpl::GetQueueParams ( TQueueParams queue_params)

◆ GetServer() [1/2]

CNetServer SNetScheduleAPIImpl::GetServer ( const CNetScheduleJob job)
inline

◆ GetServer() [2/2]

CNetServer SNetScheduleAPIImpl::GetServer ( const string job_key)
inline

◆ GetServerByNode()

bool SNetScheduleAPIImpl::GetServerByNode ( const string ns_node,
CNetServer server 
)

◆ GetServerParams()

const CNetScheduleAPI::SServerParams& SNetScheduleAPIImpl::GetServerParams ( )
inline

Definition at line 324 of file netschedule_api_impl.hpp.

Referenced by CGridClient::GetMaxServerInputSize().

◆ Init()

void SNetScheduleAPIImpl::Init ( CSynRegistry registry,
SRegSynonyms sections 
)

◆ InitAffinities()

void SNetScheduleAPIImpl::InitAffinities ( CSynRegistry registry,
const SRegSynonyms sections 
)

◆ MakeAuthString()

string SNetScheduleAPIImpl::MakeAuthString ( )

◆ SetAuthParam()

void SNetScheduleAPIImpl::SetAuthParam ( const string param_name,
const string param_value 
)

◆ StartNotificationThread()

void SNetScheduleAPIImpl::StartNotificationThread ( )

◆ UpdateAuthString()

void SNetScheduleAPIImpl::UpdateAuthString ( )

◆ UseOldStyleAuth()

void SNetScheduleAPIImpl::UseOldStyleAuth ( )

◆ x_ClearNode()

void SNetScheduleAPIImpl::x_ClearNode ( )

Member Data Documentation

◆ m_AffinityLadder

CNetScheduleGetJob::TAffinityLadder SNetScheduleAPIImpl::m_AffinityLadder

◆ m_AffinityList

list<string> SNetScheduleAPIImpl::m_AffinityList

◆ m_AffinityPreference

◆ m_AuthParams

TAuthParams SNetScheduleAPIImpl::m_AuthParams

Definition at line 382 of file netschedule_api_impl.hpp.

Referenced by MakeAuthString(), and SetAuthParam().

◆ m_ClientNode

string SNetScheduleAPIImpl::m_ClientNode

◆ m_ClientSession

string SNetScheduleAPIImpl::m_ClientSession

◆ m_ClientType

CNetScheduleAPI::EClientType SNetScheduleAPIImpl::m_ClientType = CNetScheduleAPI::eCT_Auto

Definition at line 371 of file netschedule_api_impl.hpp.

Referenced by MakeAuthString().

◆ m_CompoundIDPool

CCompoundIDPool SNetScheduleAPIImpl::m_CompoundIDPool

Definition at line 405 of file netschedule_api_impl.hpp.

◆ m_JobGroup

string SNetScheduleAPIImpl::m_JobGroup

Definition at line 400 of file netschedule_api_impl.hpp.

Referenced by Init().

◆ m_JobTtl

unsigned SNetScheduleAPIImpl::m_JobTtl = 0

Definition at line 401 of file netschedule_api_impl.hpp.

Referenced by Init(), CGridClient::Submit(), and CGridClient::WaitForJob().

◆ m_Mode

const TMode SNetScheduleAPIImpl::m_Mode
private

Definition at line 368 of file netschedule_api_impl.hpp.

Referenced by Init(), MakeAuthString(), and SNetScheduleAPIImpl().

◆ m_NotificationThread

CRef<SNetScheduleNotificationThread> SNetScheduleAPIImpl::m_NotificationThread

◆ m_NotificationThreadMutex

CFastMutex SNetScheduleAPIImpl::m_NotificationThreadMutex

Definition at line 407 of file netschedule_api_impl.hpp.

Referenced by AllocNotificationThread(), and ~SNetScheduleAPIImpl().

◆ m_NotificationThreadStartStopCounter

CAtomicCounter_WithAutoInit SNetScheduleAPIImpl::m_NotificationThreadStartStopCounter

Definition at line 409 of file netschedule_api_impl.hpp.

Referenced by StartNotificationThread(), and ~SNetScheduleAPIImpl().

◆ m_ProgramVersion

string SNetScheduleAPIImpl::m_ProgramVersion

Definition at line 377 of file netschedule_api_impl.hpp.

Referenced by MakeAuthString().

◆ m_Queue

string SNetScheduleAPIImpl::m_Queue

◆ m_RetryOnException

bool SNetScheduleAPIImpl::m_RetryOnException

Definition at line 373 of file netschedule_api_impl.hpp.

Referenced by Init().

◆ m_ServerParamsSync

struct SNetScheduleAPIImpl::SServerParamsSync SNetScheduleAPIImpl::m_ServerParamsSync

◆ m_Service

CNetService SNetScheduleAPIImpl::m_Service

◆ m_SharedData

CRef<SNetScheduleSharedData> SNetScheduleAPIImpl::m_SharedData

Definition at line 372 of file netschedule_api_impl.hpp.

Referenced by GetServerByNode(), and SNetScheduleAPIImpl().

◆ m_UseEmbeddedStorage

bool SNetScheduleAPIImpl::m_UseEmbeddedStorage

The documentation for this struct was generated from the following files:
Modified on Sat Dec 09 04:46:06 2023 by modify_doxy.py rev. 669887