hsm_JobListMgr Class Reference
[Classes for managing object list]

#include <hsm_joblistmgr.h>

Collaboration diagram for hsm_JobListMgr:

Collaboration graph
[legend]

List of all members.


Detailed Description

Definition at line 183 of file hsm_joblistmgr.h.


Public Member Functions

 hsm_JobListMgr (const int a_defaultNumOfJobs, i_PartitionManager_ptr a_iPM)
 ~hsm_JobListMgr ()
Int32_t Insert (UInt32_t a_jobIdx, hsm_FileHeader *a_fh_p)
 insert jobElement to job vector and set its position in vector
void ReleaseElement (UInt32_t a_jobIdx, UInt32_t a_jobElemIdx)
 Release jobElement from job vector.
void ReleaseElement (UInt32_t a_jobIdx, UInt32_t a_jobElemIdx, ivd_FileSize_t a_fileSize)
 When file is successfuly hndled then this call release it and increase job size statistics.
bool ReleaseJobIdxWithTest (UInt32_t a_jobIdx)
bool ReleaseJobIdxWithTest (UInt32_t a_jobIdx, UInt32_t &a_numOfHandledFiles, UInt64_t &a_sizeOfHandledFiles)
void ReleaseJobIdx (UInt32_t a_jobIdx)
UInt32_t MigrateFailedJob ()
hsm_FileHeaderAt (UInt32_t a_jobIdx, UInt32_t a_jobElemIdx)
 return pointer to job element
hsm_JobElemVecMgrAt (UInt32_t a_jobIdx)
 return pointer to job element vector
hsm_JobElemVecMgrGetJobElemVecMgr (UInt64_t a_pmJobID, Int32_t &hsmJobIdx)
 return pointer to job element vector and update hsmJobIdx
UInt32_t GetJobIdx (UInt32_t a_numFiles)
 return fre job's index, if no job is free then wait for it.
void SetMigJobID (UInt32_t a_jobIdx, UInt64_t a_pmJobID, ivd_MigrationID_t a_migID)
void SetJobStatus (UInt32_t a_jobIdx, hsm_JobStatus_e a_jobStatus)
ivd_MigrationID_t GetMigrationID (UInt32_t a_jobIdx)
UInt32_t GetNumActiveJobs ()
void GetNumJobs (UInt32_t &a_active, UInt32_t &a_prepared, UInt32_t &a_wait4doMig, UInt32_t &a_doMig, UInt32_t &a_wait4Complete, UInt32_t &a_complete, UInt32_t &a_failed, UInt32_t &a_recall)

Public Attributes

 log_CLASSID_m

Private Attributes

i_PartitionManager_var m_iPM
const int m_defaultNumOfJobs
 number of vecrtors
hsm_Job_p_v_t m_job_p_v
 vector of jobs
hsm_FreeJobIdxStack m_freeJobIdx_s
 stack of free job indeces
cmn_Mutex m_jobList_x
cmn_Mutex m_failedJob_x

Friends

class ut_hsm_JobListMgr

Constructor & Destructor Documentation

hsm_JobListMgr::hsm_JobListMgr ( const int  a_defaultNumOfJobs,
i_PartitionManager_ptr  a_iPM 
)

Definition at line 254 of file hsm_joblistmgr.cpp.

References log_FUNC_m, m_defaultNumOfJobs, m_freeJobIdx_s, m_iPM, and m_job_p_v.

00256         :
00257         m_defaultNumOfJobs(a_defaultNumOfJobs)
00258 { 
00259     log_FUNC_m(hsm_JobListMgr);
00260 
00261     m_iPM = i_PartitionManager::_duplicate(a_iPM);
00262 
00263     m_job_p_v.reserve(m_defaultNumOfJobs); 
00264     for (int i = m_defaultNumOfJobs - 1; i >= 0; i--) {
00265         hsm_JobElemVecMgr * jobElemVecMgr = new hsm_JobElemVecMgr();
00266         m_job_p_v.push_back(jobElemVecMgr);
00267         m_freeJobIdx_s.push(i);
00268     }
00269 }
//============================================================================//

hsm_JobListMgr::~hsm_JobListMgr (  ) 

Definition at line 272 of file hsm_joblistmgr.cpp.

References dbg_LOW, log_DBG_m, log_FUNC_m, m_job_p_v, and NULL.

00272                                 { 
00273     log_FUNC_m(~hsm_JobListMgr);
00274 
00275     log_DBG_m(dbg_LOW, "      ~hsm_JobListMgr: delete its elements");
00276     for (unsigned int i = 0; i < m_job_p_v.size(); i++) {
00277         delete m_job_p_v[i];
00278         m_job_p_v[i] = NULL;
00279     }
00280 }


Member Function Documentation

Int32_t hsm_JobListMgr::Insert ( UInt32_t  a_jobIdx,
hsm_FileHeader a_fh_p 
)

insert jobElement to job vector and set its position in vector

Definition at line 283 of file hsm_joblistmgr.cpp.

References cmn_Num2Str(), ie_HSM_INVJOBIDX, log_FUNC_m, and m_job_p_v.

Referenced by hsm_FileHeader::EventOffline(), hsm_FileHeader::MigCanToPreJob(), and i_HSM_i::TrigRecall().

00283                                                                         {
00284 
00285     if (static_cast<UInt32_t>(m_job_p_v.size()) <= a_jobIdx) {
00286         log_FUNC_m(Insert);
00287         throw ivd_InternalError(ie_HSM_INVJOBIDX, 
00288             "Job Idx " + cmn_Num2Str(a_jobIdx) + "  VecSize " + cmn_Num2Str(m_job_p_v.size()), true);
00289     }
00290     return m_job_p_v[a_jobIdx]->Insert(a_fh_p);
00291 }

Here is the call graph for this function:

Here is the caller graph for this function:

void hsm_JobListMgr::ReleaseElement ( UInt32_t  a_jobIdx,
UInt32_t  a_jobElemIdx 
)

Release jobElement from job vector.

Definition at line 294 of file hsm_joblistmgr.cpp.

References cmn_Num2Str(), ie_HSM_INVJOBIDX, log_FUNC_m, m_job_p_v, and hsm_JobElemVecMgr::ReleaseElement().

Referenced by hsm_FileHeader::CompleteMigIsDone(), i_HSM_i::Recall(), hsm_FileHeader::Recalled(), ReleaseElement(), and hsm_ListPos::RemoveFromList().

00294                                                                             {
00295 
00296     if (static_cast<UInt32_t>(m_job_p_v.size()) <= a_jobIdx) {
00297         log_FUNC_m(ReleaseElement);
00298         throw ivd_InternalError(ie_HSM_INVJOBIDX, 
00299             "Job Idx " + cmn_Num2Str(a_jobIdx) + "  VecSize " + cmn_Num2Str(m_job_p_v.size()), true);
00300     }
00301 
00302     hsm_JobElemVecMgr &jobElemVecMgr = *m_job_p_v[a_jobIdx];
00303 
00304     if (jobElemVecMgr.ReleaseElement(a_jobElemIdx)) {
00305     }
00306 }

Here is the call graph for this function:

Here is the caller graph for this function:

void hsm_JobListMgr::ReleaseElement ( UInt32_t  a_jobIdx,
UInt32_t  a_jobElemIdx,
ivd_FileSize_t  a_fileSize 
)

When file is successfuly hndled then this call release it and increase job size statistics.

Definition at line 309 of file hsm_joblistmgr.cpp.

References cmn_Num2Str(), ie_HSM_INVJOBIDX, log_FUNC_m, m_job_p_v, hsm_JobElemVecMgr::ReleaseElement(), and ReleaseElement().

00309                                                                                                        {
00310 
00311     if (static_cast<UInt32_t>(m_job_p_v.size()) <= a_jobIdx) {
00312         log_FUNC_m(ReleaseElement);
00313         throw ivd_InternalError(ie_HSM_INVJOBIDX, 
00314             "Job Idx " + cmn_Num2Str(a_jobIdx) + "  VecSize " + cmn_Num2Str(m_job_p_v.size()), true);
00315     }
00316 
00317     hsm_JobElemVecMgr &jobElemVecMgr = *m_job_p_v[a_jobIdx];
00318 
00319     if (jobElemVecMgr.ReleaseElement(a_jobElemIdx, a_fileSize)) {
00320     }
00321 }

Here is the call graph for this function:

bool hsm_JobListMgr::ReleaseJobIdxWithTest ( UInt32_t  a_jobIdx  ) 

Definition at line 409 of file hsm_joblistmgr.cpp.

References cmn_Num2Str(), ie_HSM_INVJOBIDX, log_FUNC_m, m_freeJobIdx_s, m_job_p_v, and hsm_FreeJobIdxStack::Push().

Referenced by i_HSM_i::CompleteMigration(), i_HSM_i::EfficientRecall(), i_HSM_i::Recall(), and ReleaseJobIdxWithTest().

00409                                                             {
00410     log_FUNC_m(ReleaseJobIdxWithTest);
00411     if (static_cast<UInt32_t>(m_job_p_v.size()) > a_jobIdx) {
00412         if (m_job_p_v[a_jobIdx]->ReleaseJobWithTest()) {
00413             m_freeJobIdx_s.Push(a_jobIdx);
00414             return true; 
00415         }
00416     }
00417     else {
00418         throw ivd_InternalError(ie_HSM_INVJOBIDX, 
00419             "Job Idx " + cmn_Num2Str(a_jobIdx) + "  VecSize " + cmn_Num2Str(m_job_p_v.size()), true);
00420 //        throw ivd_InternalError(ie_INVALID_ARG, 
00421 //            "Job index exceed vector size. " + cmn_Num2Str(a_jobIdx), true);
00422     }
00423     return false;
00424 }

Here is the call graph for this function:

Here is the caller graph for this function:

bool hsm_JobListMgr::ReleaseJobIdxWithTest ( UInt32_t  a_jobIdx,
UInt32_t a_numOfHandledFiles,
UInt64_t a_sizeOfHandledFiles 
)

Definition at line 427 of file hsm_joblistmgr.cpp.

References cmn_Num2Str(), ie_HSM_INVJOBIDX, log_FUNC_m, m_freeJobIdx_s, m_job_p_v, hsm_FreeJobIdxStack::Push(), ReleaseJobIdxWithTest(), and hsm_JobElemVecMgr::ReleaseJobWithTest().

00429                                                                            {
00430     log_FUNC_m(ReleaseJobIdxWithTest);
00431     if (static_cast<UInt32_t>(m_job_p_v.size()) > a_jobIdx) {
00432         hsm_JobElemVecMgr &jevm = *m_job_p_v[a_jobIdx];
00433         if (jevm.ReleaseJobWithTest(a_numOfHandledFiles, a_sizeOfHandledFiles)) {
00434             m_freeJobIdx_s.Push(a_jobIdx);
00435             return true; 
00436         }
00437     }
00438     else {
00439         throw ivd_InternalError(ie_HSM_INVJOBIDX, 
00440             "Job Idx " + cmn_Num2Str(a_jobIdx) + "  VecSize " + cmn_Num2Str(m_job_p_v.size()), true);
00441 //        throw ivd_InternalError(ie_INVALID_ARG, 
00442 //            "Job index exceed vector size. " + cmn_Num2Str(a_jobIdx), true);
00443     }
00444     return false;
00445 }

Here is the call graph for this function:

void hsm_JobListMgr::ReleaseJobIdx ( UInt32_t  a_jobIdx  ) 

Definition at line 448 of file hsm_joblistmgr.cpp.

References cmn_Num2Str(), ie_HSM_INVJOBIDX, log_FUNC_m, m_freeJobIdx_s, m_job_p_v, and hsm_FreeJobIdxStack::Push().

Referenced by hsm_FHmigc::Migrate(), MigrateFailedJob(), i_HSM_i::Recall(), hsm_FHmigc::SendToPM(), and i_HSM_i::TrigEfficientRecall().

00448                                                     {
00449     log_FUNC_m(ReleaseJobIdx);
00450     if (static_cast<UInt32_t>(m_job_p_v.size()) > a_jobIdx) {
00451         m_job_p_v[a_jobIdx]->ReleaseJob();
00452         m_freeJobIdx_s.Push(a_jobIdx);
00453     }
00454     else {
00455         throw ivd_InternalError(ie_HSM_INVJOBIDX, 
00456             "Job Idx " + cmn_Num2Str(a_jobIdx) + "  VecSize " + cmn_Num2Str(m_job_p_v.size()), true);
00457 //        throw ivd_InternalError(ie_INVALID_ARG, 
00458 //            "Job index exceed vector size. " + cmn_Num2Str(a_jobIdx), true);
00459     }
00460 }

Here is the call graph for this function:

Here is the caller graph for this function:

UInt32_t hsm_JobListMgr::MigrateFailedJob (  ) 

Definition at line 469 of file hsm_joblistmgr.cpp.

References dbg_DETAIL, evt_ERROR, g_cmn, ivd_BaseException::GetFriendly(), hsm_JobElemVecMgr::GetJobStatus(), hsm_JobElemVecMgr::GetMigrationID(), hjs_MIGFAILED, hjs_WAITFORDOMIG, ipc_EXEC_m, hsm_JobElemVecMgr::JobToSequence(), log_DBG_m, log_ERR_m, log_FUNC_m, log_WriteEvent(), m_failedJob_x, m_iPM, m_job_p_v, ivd_Product::m_nameShort, cmn_Global::prod, ReleaseJobIdx(), hsm_JobElemVecMgr::SetJobStatus(), and hsm_JobElemVecMgr::SetMigJobID().

Referenced by hsm_FHmigc::TrigMigration().

00469                                            {
00470     log_FUNC_m(MigrateFailedJob);
00471     UInt32_t count = 0;
00472     cmn_MutexLock l(m_failedJob_x);
00473     hsm_JobElemVecMgr** bp = &*m_job_p_v.begin();
00474     hsm_JobElemVecMgr** ip = bp;
00475     hsm_JobElemVecMgr** ep = &*m_job_p_v.end();
00476     for (; ip != ep; ++ip) {
00477         hsm_JobElemVecMgr &job = (**ip);
00478         if (job.GetJobStatus() == hjs_MIGFAILED) {
00479             i_JobRequestList_t seqTFileList;
00480             job.JobToSequence(seqTFileList);
00481             if (seqTFileList.length() > 0) {
00482                 log_DBG_m(dbg_DETAIL, "  Sequence is prepared to retry Migration of " 
00483                                     << seqTFileList.length() << " files");
00484 
00485                 try {
00486                     ipc_EXEC_m(
00487                         i_JobID_t jobID = m_iPM->Migrate(seqTFileList, job.GetMigrationID(), 0, 0, 0);
00488                         job.SetJobStatus(hjs_WAITFORDOMIG);
00489                         job.SetMigJobID(jobID, job.GetMigrationID());
00490                         count += seqTFileList.length();
00491                         log_DBG_m(dbg_DETAIL, "  Called PM retry Migrate returned. Waiting for PM to call DoMigration.");
00492                     );
00493                 }
00494                 catch (ivd_Exception &ie) {
00495                     log_ERR_m("PM->Migrate() failed: " + ie.GetFriendly());
00496                     ostringstream sstr;
00497                     sstr << "Failed to start migration on " << g_cmn.prod.m_nameShort
00498                          << "-PM (" << ie.GetFriendly() << ").";
00499                     log_WriteEvent(evt_ERROR, sstr.str());
00500                 }
00501                 catch (...){
00502                     log_ERR_m("PM->Migrate() failed: unknown exception");
00503                     log_WriteEvent(evt_ERROR, "Failed to start migration on " 
00504                                               + g_cmn.prod.m_nameShort + "-PM.");
00505                 }
00506             }
00507             else {
00508                 ReleaseJobIdx(ip - bp);
00509             }
00510         }
00511     }
00512     log_DBG_m(dbg_DETAIL, "MigrateFailedJob " 
00513                         << count << " files");
00514     return count;
00515 }

Here is the call graph for this function:

Here is the caller graph for this function:

hsm_FileHeader * hsm_JobListMgr::At ( UInt32_t  a_jobIdx,
UInt32_t  a_jobElemIdx 
)

return pointer to job element

Definition at line 324 of file hsm_joblistmgr.cpp.

References cmn_Num2Str(), ie_HSM_INVJOBIDX, log_FUNC_m, m_job_p_v, and NULL.

Referenced by At(), i_HSM_i::Recall(), and hsm_FHmigc::SendToPM().

00324                                                                            {
00325     log_FUNC_m(At(a_jobIdx, a_jobElemIdx));
00326     if (static_cast<UInt32_t>(m_job_p_v.size()) > a_jobIdx) {
00327         hsm_JobElemVecMgr &jobElemVecMgr = *m_job_p_v[a_jobIdx];
00328 
00329         if (static_cast<UInt32_t>(jobElemVecMgr.size()) > a_jobElemIdx ) {
00330             return (jobElemVecMgr[a_jobElemIdx]);
00331         }
00332     }
00333     else {
00334         throw ivd_InternalError(ie_HSM_INVJOBIDX, 
00335             "Job Idx " + cmn_Num2Str(a_jobIdx) + "  VecSize " + cmn_Num2Str(m_job_p_v.size()), true);
00336     }
00337     return NULL;
00338 }

Here is the call graph for this function:

Here is the caller graph for this function:

hsm_JobElemVecMgr & hsm_JobListMgr::At ( UInt32_t  a_jobIdx  ) 

return pointer to job element vector

Definition at line 341 of file hsm_joblistmgr.cpp.

References At(), cmn_Num2Str(), ie_HSM_INVJOBIDX, log_FUNC_m, and m_job_p_v.

00341                                                        {
00342     log_FUNC_m(At(a_jobIdx));
00343     if (static_cast<UInt32_t>(m_job_p_v.size()) > a_jobIdx) {
00344         return *m_job_p_v[a_jobIdx];
00345     }
00346     else {
00347         throw ivd_InternalError(ie_HSM_INVJOBIDX, 
00348             "Job Idx " + cmn_Num2Str(a_jobIdx) + "  VecSize " + cmn_Num2Str(m_job_p_v.size()), true);
00349 //        throw ivd_InternalError(ie_INVALID_ARG, 
00350 //            "Job index exceed vector size. " + cmn_Num2Str(a_jobIdx), true);
00351     }
00352 }

Here is the call graph for this function:

hsm_JobElemVecMgr * hsm_JobListMgr::GetJobElemVecMgr ( UInt64_t  a_pmJobID,
Int32_t hsmJobIdx 
)

return pointer to job element vector and update hsmJobIdx

Definition at line 355 of file hsm_joblistmgr.cpp.

References dbg_LOW, log_DBG_m, log_FUNC_m, m_job_p_v, and NULL.

Referenced by i_HSM_i::CompleteMigration(), i_HSM_i::DoMigrationJob(), i_HSM_i::EfficientRecall(), and i_HSM_i::Recall().

00355                                                                                           {
00356     log_FUNC_m(GetJobElemVecMgr);
00357     if (a_pmJobID == 0) {
00358         log_DBG_m(dbg_LOW, "PM JobID = " << a_pmJobID);
00359     }
00360     else {
00361         Int32_t idx = 0;
00362         for (hsm_Job_p_v_i iter = m_job_p_v.begin(); iter != m_job_p_v.end(); iter++, idx++) {
00363             if (   *iter != NULL 
00364             && (*iter)->GetPMJobID() == a_pmJobID) {
00365                 hsmJobIdx = idx;
00366                 return *iter;
00367             }
00368         }
00369         log_DBG_m(dbg_LOW, "PM JobID not found: " << a_pmJobID);
00370     }
00371     return NULL;
00372 }

Here is the caller graph for this function:

UInt32_t hsm_JobListMgr::GetJobIdx ( UInt32_t  a_numFiles  ) 

return fre job's index, if no job is free then wait for it.

see constructor for default number of job indeces

Definition at line 375 of file hsm_joblistmgr.cpp.

References log_FUNC_m, m_freeJobIdx_s, m_job_p_v, and hsm_FreeJobIdxStack::Pop().

Referenced by hsm_FileHeader::EventOffline(), hsm_FHmigc::Migrate(), i_HSM_i::TrigEfficientRecall(), and i_HSM_i::TrigRecall().

00375                                                       {
00376     log_FUNC_m(GetJobIdx);
00377 
00378     UInt32_t jobElemVecMgrIdx = m_freeJobIdx_s.Pop();
00379     m_job_p_v[jobElemVecMgrIdx]->Reserve(a_numFiles);
00380     return jobElemVecMgrIdx;
00381 }

Here is the call graph for this function:

Here is the caller graph for this function:

void hsm_JobListMgr::SetMigJobID ( UInt32_t  a_jobIdx,
UInt64_t  a_pmJobID,
ivd_MigrationID_t  a_migID 
)

Definition at line 384 of file hsm_joblistmgr.cpp.

References cmn_Num2Str(), ie_HSM_INVJOBIDX, log_FUNC_m, and m_job_p_v.

Referenced by hsm_FileHeader::EventOffline(), hsm_FHmigc::SendToPM(), i_HSM_i::TrigEfficientRecall(), and i_HSM_i::TrigRecall().

00384                                                                                                  {
00385     log_FUNC_m(SetMigJobID);
00386     if (static_cast<UInt32_t>(m_job_p_v.size()) > a_jobIdx) {
00387         m_job_p_v[a_jobIdx]->SetMigJobID(a_pmJobID, a_migID);
00388     }
00389     else {
00390         throw ivd_InternalError(ie_HSM_INVJOBIDX, 
00391             "Job Idx " + cmn_Num2Str(a_jobIdx) + "  VecSize " + cmn_Num2Str(m_job_p_v.size()), true);
00392     }
00393 }

Here is the call graph for this function:

Here is the caller graph for this function:

void hsm_JobListMgr::SetJobStatus ( UInt32_t  a_jobIdx,
hsm_JobStatus_e  a_jobStatus 
)

Definition at line 396 of file hsm_joblistmgr.cpp.

References cmn_Num2Str(), ie_HSM_INVJOBIDX, log_FUNC_m, and m_job_p_v.

Referenced by i_HSM_i::CompleteMigration(), hsm_FileHeader::EventOffline(), hsm_FHmigc::Migrate(), hsm_FHmigc::SendToPM(), i_HSM_i::TrigEfficientRecall(), and i_HSM_i::TrigRecall().

00397                                                                {
00398     log_FUNC_m(SetJobStatus);
00399     if (static_cast<UInt32_t>(m_job_p_v.size()) > a_jobIdx) {
00400         m_job_p_v[a_jobIdx]->SetJobStatus(a_jobStatus);
00401     }
00402     else {
00403         throw ivd_InternalError(ie_HSM_INVJOBIDX, 
00404             "Job Idx " + cmn_Num2Str(a_jobIdx) + "  VecSize " + cmn_Num2Str(m_job_p_v.size()), true);
00405     }
00406 }

Here is the call graph for this function:

Here is the caller graph for this function:

ivd_MigrationID_t hsm_JobListMgr::GetMigrationID ( UInt32_t  a_jobIdx  ) 

Definition at line 573 of file hsm_joblistmgr.cpp.

References cmn_Num2Str(), ie_HSM_INVJOBIDX, log_FUNC_m, and m_job_p_v.

Referenced by hsm_FileHeader::GetJobMigID().

00573                                                                   {
00574     log_FUNC_m(GetMigrationID);
00575     if (static_cast<UInt32_t>(m_job_p_v.size()) > a_jobIdx) {
00576         return m_job_p_v[a_jobIdx]->GetMigrationID();
00577     }
00578     else {
00579         throw ivd_InternalError(ie_HSM_INVJOBIDX, 
00580             "Job Idx " + cmn_Num2Str(a_jobIdx) + "  VecSize " + cmn_Num2Str(m_job_p_v.size()), true);
00581     }
00582     return 0;
00583 }

Here is the call graph for this function:

Here is the caller graph for this function:

UInt32_t hsm_JobListMgr::GetNumActiveJobs (  )  [inline]

Definition at line 248 of file hsm_joblistmgr.h.

References m_defaultNumOfJobs, and m_freeJobIdx_s.

00248 { return m_defaultNumOfJobs - m_freeJobIdx_s.size();};

void hsm_JobListMgr::GetNumJobs ( UInt32_t a_active,
UInt32_t a_prepared,
UInt32_t a_wait4doMig,
UInt32_t a_doMig,
UInt32_t a_wait4Complete,
UInt32_t a_complete,
UInt32_t a_failed,
UInt32_t a_recall 
)

Definition at line 518 of file hsm_joblistmgr.cpp.

References hjs_COMPLETEMIG, hjs_DOMIG, hjs_MIGFAILED, hjs_PREPARATION, hjs_RECALL, hjs_WAITFORCOMPLETEMIG, hjs_WAITFORDOMIG, log_FUNC_m, m_failedJob_x, and m_job_p_v.

Referenced by i_HSM_i::GetInfo(), and i_HSM_i::ShowStatus().

00525                                                    {
00526     log_FUNC_m(GetNumJobs);
00527     a_active    = 0;
00528     a_prepared  = 0;
00529     a_wait4doMig    = 0;
00530     a_doMig         = 0;
00531     a_wait4Complete = 0;
00532     a_complete  = 0;
00533     a_failed    = 0;
00534     a_recall    = 0;
00535 
00536     cmn_MutexLock l(m_failedJob_x);
00537     hsm_JobElemVecMgr** ip = &*m_job_p_v.begin();
00538     hsm_JobElemVecMgr** ep = &*m_job_p_v.end();
00539     for (; ip != ep; ++ip) {
00540         switch ((**ip).GetJobStatus()) {
00541         case hjs_MIGFAILED :
00542             ++a_failed;
00543             break;
00544         case hjs_PREPARATION :
00545             ++a_prepared;
00546             ++a_active;
00547             break;
00548         case  hjs_WAITFORDOMIG:
00549             ++a_wait4doMig;
00550             ++a_active;
00551             break;
00552         case  hjs_DOMIG:
00553             ++a_doMig;
00554             ++a_active;
00555             break;
00556         case  hjs_WAITFORCOMPLETEMIG:
00557             ++a_wait4Complete;
00558             ++a_active;
00559             break;
00560         case  hjs_COMPLETEMIG:
00561             ++a_complete;
00562             ++a_active;
00563             break;
00564         case  hjs_RECALL:
00565             ++a_recall;
00566             break;
00567         default : break;
00568         }
00569     }
00570 }

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class ut_hsm_JobListMgr [friend]

Definition at line 184 of file hsm_joblistmgr.h.


Member Data Documentation

i_PartitionManager_var hsm_JobListMgr::m_iPM [private]

Definition at line 192 of file hsm_joblistmgr.h.

Referenced by hsm_JobListMgr(), and MigrateFailedJob().

number of vecrtors

Definition at line 194 of file hsm_joblistmgr.h.

Referenced by GetNumActiveJobs(), and hsm_JobListMgr().

stack of free job indeces

Definition at line 200 of file hsm_joblistmgr.h.

Referenced by GetJobIdx(), GetNumActiveJobs(), hsm_JobListMgr(), ReleaseJobIdx(), and ReleaseJobIdxWithTest().

Definition at line 202 of file hsm_joblistmgr.h.

Definition at line 203 of file hsm_joblistmgr.h.

Referenced by GetNumJobs(), and MigrateFailedJob().

Definition at line 206 of file hsm_joblistmgr.h.


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

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