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

Search Toolkit Book for CNSScopeRegistry

#include "ns_scope.hpp"
(Private to src/app/netschedule.)

+ Collaboration diagram for CNSScopeRegistry:

Public Member Functions

 CNSScopeRegistry ()
 
 ~CNSScopeRegistry ()
 
size_t size (void) const
 
bool CanAccept (const string &scope, size_t max_records) const
 
TNSBitVector GetJobs (const string &scope) const
 
TNSBitVector GetAllJobsInScopes (void) const
 
void AddJob (const string &scope, unsigned int job_id)
 
void AddJobs (const string &scope, unsigned int first_job_id, unsigned int count)
 
void RemoveJob (unsigned int job_id)
 
deque< stringGetScopeNames (void) const
 
string GetJobScope (unsigned int job_id) const
 
string Print (const CQueue *queue, size_t batch_size, bool verbose) const
 
void Clear (void)
 
unsigned int CollectGarbage (unsigned int max_to_del)
 
unsigned int CheckRemoveCandidates (void)
 

Private Types

typedef map< string, TNSBitVectorTScopeToJobsMap
 

Private Member Functions

string x_PrintOne (const string &scope_name, const TNSBitVector &jobs, const CQueue *queue, bool verbose) const
 
string x_PrintSelected (const deque< string > &batch, const CQueue *queue, bool verbose) const
 

Private Attributes

TScopeToJobsMap m_ScopeToJobs
 
CMutex m_Lock
 
TNSBitVector m_AllScopedJobs
 

Detailed Description

Definition at line 59 of file ns_scope.hpp.

Member Typedef Documentation

◆ TScopeToJobsMap

Definition at line 88 of file ns_scope.hpp.

Constructor & Destructor Documentation

◆ CNSScopeRegistry()

CNSScopeRegistry::CNSScopeRegistry ( )

Definition at line 43 of file ns_scope.cpp.

◆ ~CNSScopeRegistry()

CNSScopeRegistry::~CNSScopeRegistry ( )

Definition at line 47 of file ns_scope.cpp.

References Clear().

Member Function Documentation

◆ AddJob()

void CNSScopeRegistry::AddJob ( const string scope,
unsigned int  job_id 
)

◆ AddJobs()

void CNSScopeRegistry::AddJobs ( const string scope,
unsigned int  first_job_id,
unsigned int  count 
)

◆ CanAccept()

bool CNSScopeRegistry::CanAccept ( const string scope,
size_t  max_records 
) const

◆ CheckRemoveCandidates()

unsigned int CNSScopeRegistry::CheckRemoveCandidates ( void  )

◆ Clear()

void CNSScopeRegistry::Clear ( void  )

◆ CollectGarbage()

unsigned int CNSScopeRegistry::CollectGarbage ( unsigned int  max_to_del)

◆ GetAllJobsInScopes()

TNSBitVector CNSScopeRegistry::GetAllJobsInScopes ( void  ) const

◆ GetJobs()

TNSBitVector CNSScopeRegistry::GetJobs ( const string scope) const

◆ GetJobScope()

string CNSScopeRegistry::GetJobScope ( unsigned int  job_id) const

◆ GetScopeNames()

deque< string > CNSScopeRegistry::GetScopeNames ( void  ) const

◆ Print()

string CNSScopeRegistry::Print ( const CQueue queue,
size_t  batch_size,
bool  verbose 
) const

Definition at line 156 of file ns_scope.cpp.

References GetScopeNames(), result, and x_PrintSelected().

Referenced by CQueue::PrintScopesList().

◆ RemoveJob()

void CNSScopeRegistry::RemoveJob ( unsigned int  job_id)

◆ size()

size_t CNSScopeRegistry::size ( void  ) const

Definition at line 53 of file ns_scope.cpp.

References m_Lock, m_ScopeToJobs, and map_checker< Container >::size().

Referenced by CQueue::GetScopeSlotsUsed().

◆ x_PrintOne()

string CNSScopeRegistry::x_PrintOne ( const string scope_name,
const TNSBitVector jobs,
const CQueue queue,
bool  verbose 
) const
private

◆ x_PrintSelected()

string CNSScopeRegistry::x_PrintSelected ( const deque< string > &  batch,
const CQueue queue,
bool  verbose 
) const
private

Member Data Documentation

◆ m_AllScopedJobs

TNSBitVector CNSScopeRegistry::m_AllScopedJobs
private

Definition at line 94 of file ns_scope.hpp.

Referenced by AddJob(), Clear(), GetAllJobsInScopes(), GetJobScope(), and RemoveJob().

◆ m_Lock

CMutex CNSScopeRegistry::m_Lock
mutableprivate

◆ m_ScopeToJobs

TScopeToJobsMap CNSScopeRegistry::m_ScopeToJobs
private

The documentation for this class was generated from the following files:
Modified on Fri Apr 12 17:14:57 2024 by modify_doxy.py rev. 669887