hsm_Containers Class Reference
[Classes for managing object list]

#include <hsm_containers.h>

Collaboration diagram for hsm_Containers:

Collaboration graph
[legend]

List of all members.


Detailed Description

Definition at line 28 of file hsm_containers.h.


Public Member Functions

 hsm_Containers (string &a_fsUUID, const cmn_Path &a_path, i_PartitionManager_ptr a_iPM)
virtual ~hsm_Containers ()
void Start ()
void Stop ()

Public Attributes

 log_CLASSID_m

Private Attributes

bool m_RecallFromADPRun
bool m_dirtyListRun
bool m_migcListRun
bool m_relcListRun
bool m_dirWaitListRun
fio_DataBase m_hsmDB

Constructor & Destructor Documentation

hsm_Containers::hsm_Containers ( string &  a_fsUUID,
const cmn_Path a_path,
i_PartitionManager_ptr  a_iPM 
)

Definition at line 81 of file hsm_containers.cpp.

References ClientConf_t::CfgAlternateDataPath, ClientConf_t::CfgCriticalWaterMark, ClientConf_t::CfgHighWaterMark, ClientConf_t::CfgLowWaterMark, ClientConf_t::CfgMaxMigSize, ClientConf_t::CfgMaxNumFiles, ClientConf_t::CfgMaxWaitTime, ClientConf_t::CfgMFAge, ClientConf_t::CfgMigRetentionTime, ClientConf_t::CfgMinFileSize, ClientConf_t::CfgMinMigSize, ClientConf_t::CfgMinNumFiles, ClientConf_t::CfgMinWaitTime, ClientConf_t::CfgRecallRetentionTime, ClientConf_t::CfgReleaseInterval, cmn_GetEnvVariable(), g_Active_p, g_clientConf_p, g_hsmDB_p, g_mig, hsm_defDirWaitTime_c, hsm_defNumberOfJobs_c, hsm_DirWaitTime_c(), hsm_maxDirWaitTime_c, hsm_maxNumberOfJobs_c, hsm_NumberOfJobs_c(), ivd_NULLCHK_m, log_FUNC_m, m_dirtyListRun, m_dirWaitListRun, m_hsmDB, m_migcListRun, m_RecallFromADPRun, m_relcListRun, and s_className.

00085         :
00086         m_RecallFromADPRun(false),
00087         m_dirtyListRun(false),
00088         m_migcListRun(false),
00089         m_relcListRun(false),
00090         m_dirWaitListRun(false),
00091         m_hsmDB(cmn_UUID_t(a_fsUUID), 
00092                 a_path,  
00093                 new hdb_Tables(a_path, false)) // read write mode
00094 {
00095     log_FUNC_m(hsm_Containers);
00096 
00097     // set global database variable
00098     g_hsmDB_p = &m_hsmDB;
00099 
00100     g_hsm_FHCache_p     = new hsm_FHcache(100000); // elements
00101     ivd_NULLCHK_m(g_hsm_FHCache_p, hsm_FHcache::s_className);
00102 
00103     unsigned int numOfJobs = hsm_defNumberOfJobs_c;
00104     string s = cmn_GetEnvVariable(hsm_NumberOfJobs_c);
00105     if (!s.empty()) {
00106         unsigned int n = atoi(s.c_str());
00107         if (n < hsm_maxNumberOfJobs_c) {
00108             numOfJobs = n;
00109         }
00110     }
00111 
00112     g_hsm_preJobList_p  = new hsm_JobListMgr(numOfJobs, a_iPM); // number of job vectors
00113     ivd_NULLCHK_m(g_hsm_preJobList_p, hsm_JobListMgr::s_className);
00114 
00115 
00116     unsigned int dirWaitTime = hsm_defDirWaitTime_c;
00117     string sWaitTime = cmn_GetEnvVariable(hsm_DirWaitTime_c);
00118     if (!sWaitTime.empty()) {
00119         unsigned int n = atoi(sWaitTime.c_str());
00120         if (  n < hsm_maxDirWaitTime_c
00121            && n > 0) {
00122             dirWaitTime = n;
00123         }
00124     }
00125     
00126     // hold directories for dirWaitTime. Default is 10 min.
00127     g_hsm_dirWaitList_p = new hsm_DirWaitList(m_dirWaitListRun, dirWaitTime);
00128     
00129     ivd_NULLCHK_m(g_hsm_dirWaitList_p, hsm_DirWaitList::s_className);
00130 
00131     g_hsm_relcList_p    = new hsm_FHrelc(m_relcListRun,
00132             g_clientConf_p->CfgReleaseInterval,
00133             g_clientConf_p->CfgLowWaterMark,        
00134             g_clientConf_p->CfgHighWaterMark,       
00135             g_clientConf_p->CfgCriticalWaterMark,   
00136             g_clientConf_p->CfgMigRetentionTime,    
00137             g_clientConf_p->CfgRecallRetentionTime, 
00138             g_clientConf_p->CfgMinFileSize);        
00139     ivd_NULLCHK_m(g_hsm_relcList_p, hsm_FHrelc::s_className);
00140 
00141     g_hsm_migcList_p    = new hsm_FHmigc(m_migcListRun, a_iPM,
00142             g_clientConf_p->CfgMinWaitTime,   
00143             g_clientConf_p->CfgMinNumFiles, 
00144             g_clientConf_p->CfgMinMigSize,    
00145             g_clientConf_p->CfgMaxWaitTime,   
00146             g_clientConf_p->CfgMaxNumFiles,
00147             g_clientConf_p->CfgMaxMigSize,
00148             g_mig);
00149 
00150     ivd_NULLCHK_m(g_hsm_migcList_p, hsm_FHmigc::s_className);
00151 
00152     g_hsm_dirtyList_p = new hsm_FHdirty(m_dirtyListRun, g_clientConf_p->CfgMFAge); //DEF_MINFILEAGE); // minFileAge seconds
00153     ivd_NULLCHK_m(g_hsm_dirtyList_p, hsm_FHdirty::s_className);
00154 
00155     g_hsm_activeList_p  = new hsm_ActiveFH(*g_Active_p);
00156 
00157     g_hsm_FHADPRecall_p = new hsm_FHADPRecall(m_RecallFromADPRun, g_clientConf_p->CfgAlternateDataPath);
00158 
00159 }
//============================================================================//

Here is the call graph for this function:

hsm_Containers::~hsm_Containers (  )  [virtual]

Definition at line 163 of file hsm_containers.cpp.

References log_FUNC_m, and Stop().

00164 {
00165     log_FUNC_m(~hsm_Containers);
00166     Stop();
00167     delete g_hsm_activeList_p;
00168 //DEL    delete g_hsm_dirtyList_p;   CORBA already delete objects
00169 //DEL    delete g_hsm_migcList_p;
00170 //DEL    delete g_hsm_relcList_p;
00171 //DEL    delete g_hsm_dirWaitList_p;
00172     delete g_hsm_preJobList_p;
00173     delete g_hsm_FHCache_p;
00174 }

Here is the call graph for this function:


Member Function Documentation

void hsm_Containers::Start (  ) 

Definition at line 178 of file hsm_containers.cpp.

References log_FUNC_m, and cmn_Thread::Start().

Referenced by fs_api::EventMounted().

00178                            {
00179     log_FUNC_m(Start);
00180     g_hsm_dirWaitList_p->Start();
00181     g_hsm_relcList_p->Start();
00182     g_hsm_migcList_p->Start();
00183     g_hsm_dirtyList_p->Start();
00184     g_hsm_FHADPRecall_p->Start();
00185 }

Here is the call graph for this function:

Here is the caller graph for this function:

void hsm_Containers::Stop (  ) 

Definition at line 189 of file hsm_containers.cpp.

References dbg_LOW, ivd_NULLCHK_m, ivd_Sleep, log_DBG_m, log_FUNC_m, m_dirtyListRun, m_dirWaitListRun, m_migcListRun, m_RecallFromADPRun, m_relcListRun, s_className, hsm_FHrelc::Shutdown(), hsm_FHmigc::Shutdown(), hsm_TimedList::Shutdown(), and hsm_FHADPRecall::Shutdown().

Referenced by ~hsm_Containers().

00189                           {
00190     log_FUNC_m(Stop);
00191 
00192     log_DBG_m(dbg_LOW, "Ask RecallFromADP list to stop");
00193     g_hsm_FHADPRecall_p->Shutdown();
00194     while (m_RecallFromADPRun) {
00195         ivd_Sleep(1);
00196         log_DBG_m(dbg_LOW, "Wait RecallFromADP list to stop");
00197     }
00198 
00199     log_DBG_m(dbg_LOW, "Ask Dirty list to stop");
00200     ivd_NULLCHK_m(g_hsm_dirtyList_p, "pointer to dirty list is not valid.");
00201     g_hsm_dirtyList_p->Shutdown();
00202     while (m_dirtyListRun) {
00203         ivd_Sleep(1);
00204         log_DBG_m(dbg_LOW, "Wait Dirty list to stop");
00205     }
00206 
00207     log_DBG_m(dbg_LOW, "Ask MigCand list to stop");
00208     ivd_NULLCHK_m(g_hsm_migcList_p, "pointer to mig candidate list is not valid.");
00209     g_hsm_migcList_p->Shutdown();
00210     while (m_migcListRun) {
00211         ivd_Sleep(1);
00212         log_DBG_m(dbg_LOW, "Wait MigCand list to stop");
00213     }
00214 
00215     log_DBG_m(dbg_LOW, "Ask RelCand list to stop");
00216     ivd_NULLCHK_m(g_hsm_relcList_p, "pointer to release candidate list is not valid.");
00217     g_hsm_relcList_p->Shutdown();
00218     while (m_relcListRun) {
00219         ivd_Sleep(1);
00220         log_DBG_m(dbg_LOW, "Wait RelCand list to stop");
00221     }
00222 
00223     log_DBG_m(dbg_LOW, "Ask DirWait list to stop");
00224     ivd_NULLCHK_m(g_hsm_dirWaitList_p, hsm_DirWaitList::s_className);
00225     g_hsm_dirWaitList_p->Shutdown();
00226     while (m_dirWaitListRun) {
00227         ivd_Sleep(1);
00228         log_DBG_m(dbg_LOW, "Wait DirWait list to stop");
00229     }
00230 }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 37 of file hsm_containers.h.

Referenced by hsm_Containers(), and Stop().

Definition at line 38 of file hsm_containers.h.

Referenced by hsm_Containers(), and Stop().

Definition at line 39 of file hsm_containers.h.

Referenced by hsm_Containers(), and Stop().

Definition at line 40 of file hsm_containers.h.

Referenced by hsm_Containers(), and Stop().

Definition at line 41 of file hsm_containers.h.

Referenced by hsm_Containers(), and Stop().

Definition at line 43 of file hsm_containers.h.

Referenced by hsm_Containers().

Definition at line 46 of file hsm_containers.h.


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

Generated on Mon Feb 27 19:25:46 2012 for OPENARCHIVE by  doxygen 1.5.6