hsm_FreeJobIdxStack Class Reference
[Classes for managing object list]

#include <hsm_joblistmgr.h>

Collaboration diagram for hsm_FreeJobIdxStack:

Collaboration graph
[legend]

List of all members.


Detailed Description

Definition at line 72 of file hsm_joblistmgr.h.


Public Member Functions

 hsm_FreeJobIdxStack ()
void Push (UInt32_t a_idx)
UInt32_t Pop ()

Public Attributes

 log_CLASSID_m
cmn_Condition m_someElementOnStack
cmn_Mutex m_jobElemVecMgr_x

Constructor & Destructor Documentation

hsm_FreeJobIdxStack::hsm_FreeJobIdxStack (  )  [inline]

Definition at line 74 of file hsm_joblistmgr.h.

00075         :
00076     m_someElementOnStack(&m_jobElemVecMgr_x) {
00077         //Empty
00078     };
public:


Member Function Documentation

void hsm_FreeJobIdxStack::Push ( UInt32_t  a_idx  ) 

Definition at line 221 of file hsm_joblistmgr.cpp.

References cmn_Condition::Broadcast(), log_FUNC_m, m_jobElemVecMgr_x, m_someElementOnStack, and size.

Referenced by hsm_JobListMgr::ReleaseJobIdx(), and hsm_JobListMgr::ReleaseJobIdxWithTest().

00221                                              {
00222     log_FUNC_m(Push);
00223 
00224     cmn_MutexLock l(m_jobElemVecMgr_x);
00225     push(a_idx);
00226     if (size() == 1) {  // 
00227 //        log_FUNC_m(Push);
00228 //        log_DBG_m(dbg_DETAIL, "Release on job index to stack. idx = " << a_idx);
00229         m_someElementOnStack.Broadcast();
00230     };
00231 }

Here is the call graph for this function:

Here is the caller graph for this function:

UInt32_t hsm_FreeJobIdxStack::Pop (  ) 

Definition at line 234 of file hsm_joblistmgr.cpp.

References dbg_DETAIL, log_DBG_m, log_FUNC_m, log_NOTE_m, m_jobElemVecMgr_x, m_someElementOnStack, size, and cmn_Condition::Wait().

Referenced by hsm_JobListMgr::GetJobIdx().

00234                                   {
00235     log_FUNC_m(Pop);
00236 
00237     cmn_MutexLock l(m_jobElemVecMgr_x);
00238     while (size() == 0) {
00239         log_FUNC_m(Pop);
00240         ostringstream sstr;
00241         sstr << "HSM is overloaded and cannot starts new jobs. Wait for running jobs to complete and restart failed jobs.";
00242 //        log_WriteEvent(evt_INFO, sstr.str());        
00243         log_DBG_m(dbg_DETAIL, sstr.str());
00244         log_NOTE_m(sstr.str());
00245         m_someElementOnStack.Wait();
00246     };
00247     UInt32_t idx = top();
00248     pop();
00249     return idx; 
00250 }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 78 of file hsm_joblistmgr.h.

Definition at line 82 of file hsm_joblistmgr.h.

Referenced by Pop(), and Push().

Definition at line 83 of file hsm_joblistmgr.h.

Referenced by Pop(), and Push().


The documentation for this class was generated from the following files:

Generated on Mon Feb 27 19:28:09 2012 for OPENARCHIVE by  doxygen 1.5.6