#include <pm_reorgvolstatus.h>
Definition at line 30 of file pm_reorgvolstatus.h.
Public Member Functions | |
| pm_ReorgVolStatus (string a_partName) | |
| ~pm_ReorgVolStatus () | |
| void | Init (UInt32_t a_mediaKey, UInt32_t a_blockSize) |
| void | Check (UInt32_t a_num) |
| i_FileLocationDataList_t * | GetNextRecallSet () |
| void | SetReadFinished (i_CompletionStatus_e a_status) |
| void | SetWriteFinished (i_CompletionStatus_e a_status) |
| bool | CurrentWriteFinished () |
| bool | IsAllWriteFinished () |
| bool | AllSuccess () |
| void | Next () |
| void | Begin () |
| UInt32_t | ValidDataSize () |
| void | Insert (i_MediumVol_t &a_medVol) |
| i_MediumVol_t & | GetMedVol (UInt32_t a_num) |
| void | SetMedVol (i_MediumVol_t &a_medVol) |
| pm_VolStatus & | GetCurrentMedVol () |
| UInt32_t | NumOfVol () |
| i_MediumVol_t | GetCurrentVol () |
| void | GetAllReorgVol (vector< i_MediumVol_t > &volumes) |
| i_CompletionStatus_e | GetReadStatus () |
| i_CompletionStatus_e | GetWriteStatus () |
Private Attributes | |
| string | m_partName |
| vector< pm_VolStatus > | m_vol |
| UInt32_t | m_currentVol |
| UInt32_t | m_mediaKey |
| UInt32_t | m_blockSize |
| bool | m_initialized |
| bool | m_valid |
| log_CLASSID_m | |
| pm_ReorgVolStatus::pm_ReorgVolStatus | ( | string | a_partName | ) |
Definition at line 33 of file pm_reorgvolstatus.cpp.
00033 : 00034 m_partName(a_partName), 00035 m_currentVol(0), 00036 m_initialized(false), 00037 m_valid(false){ 00038 //empty 00039 } //============================================================================//
| pm_ReorgVolStatus::~pm_ReorgVolStatus | ( | ) |
Definition at line 49 of file pm_reorgvolstatus.cpp.
References m_blockSize, m_initialized, and m_mediaKey.
Referenced by i_ReorgJob_i::i_ReorgJob_i().
00049 { 00050 m_mediaKey = a_mediaKey; 00051 m_blockSize = a_blockSize; 00052 m_initialized = true; 00053 }

| void pm_ReorgVolStatus::Check | ( | UInt32_t | a_num | ) |
Definition at line 57 of file pm_reorgvolstatus.cpp.
References ie_FATAL_ERROR, and m_vol.
Referenced by GetCurrentMedVol(), GetCurrentVol(), GetMedVol(), GetNextRecallSet(), SetMedVol(), SetReadFinished(), SetWriteFinished(), and ValidDataSize().
00057 { 00058 if(a_num >= m_vol.size()){ 00059 throw ivd_InternalError(ie_FATAL_ERROR, 00060 "BUG: Accessing unexisting vector element."); 00061 } 00062 }

| i_FileLocationDataList_t * pm_ReorgVolStatus::GetNextRecallSet | ( | ) |
Definition at line 66 of file pm_reorgvolstatus.cpp.
References Check(), m_currentVol, and m_vol.
00066 { 00067 Check(m_currentVol); 00068 return m_vol[m_currentVol].m_recallSetReader.GetNextRecallSet(); 00069 }

| void pm_ReorgVolStatus::SetReadFinished | ( | i_CompletionStatus_e | a_status | ) |
Definition at line 73 of file pm_reorgvolstatus.cpp.
References Check(), m_currentVol, and m_vol.
Referenced by i_ReorgJob_i::Execute(), i_ReorgJob_i::MediumOperationComplete(), and i_ReorgJob_i::RecallFiles().
00073 { 00074 Check(m_currentVol); 00075 m_vol[m_currentVol].ReadFinished(a_status); 00076 }


| void pm_ReorgVolStatus::SetWriteFinished | ( | i_CompletionStatus_e | a_status | ) |
Definition at line 80 of file pm_reorgvolstatus.cpp.
References Check(), ie_FATAL_ERROR, m_currentVol, and m_vol.
Referenced by i_ReorgJob_i::Execute(), i_ReorgJob_i::MediumOperationComplete(), and i_ReorgJob_i::RecallFiles().
00080 { 00081 Check(m_currentVol); 00082 if (!m_vol[m_currentVol].m_recallSetReader.IsReadFinished()){ 00083 throw ivd_InternalError(ie_FATAL_ERROR, 00084 "BUG: Data set not written!"); 00085 } 00086 m_vol[m_currentVol].WriteFinished(a_status); 00087 }


| bool pm_ReorgVolStatus::CurrentWriteFinished | ( | ) |
Definition at line 91 of file pm_reorgvolstatus.cpp.
References m_currentVol, and m_vol.
00091 { 00092 return m_vol[m_currentVol].IsWrite(); 00093 }
| bool pm_ReorgVolStatus::IsAllWriteFinished | ( | ) |
Definition at line 97 of file pm_reorgvolstatus.cpp.
References log_FUNC_m, and m_vol.
00097 { 00098 log_FUNC_m(IsAllWriteFinished); 00099 for (UInt32_t i(0); i < m_vol.size(); i++){ 00100 if (m_vol[i].IsWrite()){ 00101 continue; 00102 } else { 00103 return false; 00104 } 00105 } //for 00106 return true; 00107 }
| bool pm_ReorgVolStatus::AllSuccess | ( | ) |
Definition at line 111 of file pm_reorgvolstatus.cpp.
References i_SUCCEDED, log_FUNC_m, and m_vol.
00111 { 00112 log_FUNC_m(AllSuccess); 00113 for (UInt32_t i(0); i < m_vol.size(); i++){ 00114 if (m_vol[i].m_writeStatus == i_SUCCEDED){ 00115 continue; 00116 } else { 00117 return false; 00118 } 00119 } //for 00120 return true; 00121 }
| void pm_ReorgVolStatus::Next | ( | ) |
Definition at line 125 of file pm_reorgvolstatus.cpp.
References ie_VOL_NOT_FOUND, ivd_Error, log_FUNC_m, m_currentVol, m_valid, and m_vol.
Referenced by i_ReorgJob_i::Execute(), i_ReorgJob_i::InitializeVolumes(), i_ReorgJob_i::RecallFiles(), and i_ReorgJob_i::~i_ReorgJob_i().
00125 { 00126 log_FUNC_m(Next); 00127 if (++m_currentVol >= m_vol.size()){ 00128 m_valid = false; 00129 throw ivd_Error(ie_VOL_NOT_FOUND); 00130 } 00131 }

| void pm_ReorgVolStatus::Begin | ( | ) | [inline] |
Definition at line 52 of file pm_reorgvolstatus.h.
References m_currentVol.
Referenced by i_ReorgJob_i::Execute(), i_ReorgJob_i::InitializeVolumes(), and i_ReorgJob_i::~i_ReorgJob_i().
00052 { 00053 m_currentVol = 0; 00054 }

| UInt32_t pm_ReorgVolStatus::ValidDataSize | ( | ) |
Definition at line 135 of file pm_reorgvolstatus.cpp.
References Check(), m_currentVol, and m_vol.
Referenced by i_ReorgJob_i::DiskBufferCleanup(), and i_ReorgJob_i::Execute().
00135 { 00136 Check(m_currentVol); 00137 return m_vol[m_currentVol].ValidDataSize(); 00138 }


| void pm_ReorgVolStatus::Insert | ( | i_MediumVol_t & | a_medVol | ) |
Definition at line 142 of file pm_reorgvolstatus.cpp.
References dbg_NORM, ie_FATAL_ERROR, log_DBG_m, log_FUNC_m, m_blockSize, m_initialized, m_mediaKey, m_partName, m_valid, and m_vol.
Referenced by i_ReorgJob_i::i_ReorgJob_i().
00142 { 00143 log_FUNC_m(Insert); 00144 if (!m_initialized){ 00145 throw ivd_InternalError(ie_FATAL_ERROR,"m_ReorgVolStatus not initialized."); 00146 } 00147 m_vol.push_back(pm_VolStatus( a_medVol, 00148 m_mediaKey, 00149 m_partName, 00150 m_blockSize)); 00151 m_valid = true; 00152 log_DBG_m(dbg_NORM, " m_vol: new element inserted. Size: " << m_vol.size() << 00153 " location: " << &m_vol[m_vol.size() - 1]); 00154 }

| i_MediumVol_t & pm_ReorgVolStatus::GetMedVol | ( | UInt32_t | a_num | ) |
| void pm_ReorgVolStatus::SetMedVol | ( | i_MediumVol_t & | a_medVol | ) |
Definition at line 165 of file pm_reorgvolstatus.cpp.
References Check(), m_currentVol, and m_vol.
Referenced by i_ReorgJob_i::RecallFiles().
00165 { 00166 Check(m_currentVol); 00167 return m_vol[m_currentVol].SetVolume(a_medVol); 00168 }


| pm_VolStatus & pm_ReorgVolStatus::GetCurrentMedVol | ( | ) |
Definition at line 184 of file pm_reorgvolstatus.cpp.
References Check(), GetCurrentVol(), log_FUNC_m, m_currentVol, and m_vol.
Referenced by i_ReorgJob_i::Execute(), i_ReorgJob_i::GetNextRecallSet(), i_ReorgJob_i::MigrateFiles(), i_ReorgJob_i::RecallFiles(), and i_ReorgJob_i::~i_ReorgJob_i().
00184 { 00185 log_FUNC_m(GetCurrentVol); 00186 Check(m_currentVol); 00187 return m_vol[m_currentVol]; 00188 }


| UInt32_t pm_ReorgVolStatus::NumOfVol | ( | ) |
Definition at line 172 of file pm_reorgvolstatus.cpp.
References m_vol.
Referenced by i_ReorgJob_i::i_ReorgJob_i().
00172 { 00173 return m_vol.size(); 00174 }

| i_MediumVol_t pm_ReorgVolStatus::GetCurrentVol | ( | ) |
Definition at line 177 of file pm_reorgvolstatus.cpp.
References Check(), log_FUNC_m, m_currentVol, and m_vol.
Referenced by i_ReorgJob_i::Execute(), GetCurrentMedVol(), i_ReorgJob_i::InitializeVolumes(), i_ReorgJob_i::MigrateFiles(), i_ReorgJob_i::ReadSourceVolume(), and i_ReorgJob_i::RecallFiles().
00177 { 00178 log_FUNC_m(GetCurrentVol); 00179 Check(m_currentVol); 00180 return m_vol[m_currentVol].Get(); 00181 }


| void pm_ReorgVolStatus::GetAllReorgVol | ( | vector< i_MediumVol_t > & | volumes | ) |
Definition at line 191 of file pm_reorgvolstatus.cpp.
References log_FUNC_m, and m_vol.
Referenced by i_ReorgJob_i::~i_ReorgJob_i().
00191 { 00192 log_FUNC_m(GetAllReorgVol); 00193 for (UInt32_t i = 0; i < m_vol.size(); i++) { 00194 a_volumes.push_back(m_vol[i].m_medVol); 00195 } 00196 }

| i_CompletionStatus_e pm_ReorgVolStatus::GetReadStatus | ( | ) | [inline] |
Definition at line 66 of file pm_reorgvolstatus.h.
References m_currentVol, and m_vol.
Referenced by i_ReorgJob_i::InitializeVolumes(), i_ReorgJob_i::MigrateFiles(), and i_ReorgJob_i::RecallFiles().
00066 { 00067 return m_vol[m_currentVol].m_readStatus; 00068 };

| i_CompletionStatus_e pm_ReorgVolStatus::GetWriteStatus | ( | ) | [inline] |
Definition at line 70 of file pm_reorgvolstatus.h.
References m_currentVol, and m_vol.
Referenced by i_ReorgJob_i::Execute(), i_ReorgJob_i::InitializeVolumes(), and i_ReorgJob_i::MigrateFiles().
00070 { 00071 return m_vol[m_currentVol].m_writeStatus; 00072 };

string pm_ReorgVolStatus::m_partName [private] |
vector<pm_VolStatus> pm_ReorgVolStatus::m_vol [private] |
Definition at line 76 of file pm_reorgvolstatus.h.
Referenced by AllSuccess(), Check(), CurrentWriteFinished(), GetAllReorgVol(), GetCurrentMedVol(), GetCurrentVol(), GetMedVol(), GetNextRecallSet(), GetReadStatus(), GetWriteStatus(), Insert(), IsAllWriteFinished(), Next(), NumOfVol(), SetMedVol(), SetReadFinished(), SetWriteFinished(), and ValidDataSize().
UInt32_t pm_ReorgVolStatus::m_currentVol [private] |
Definition at line 77 of file pm_reorgvolstatus.h.
Referenced by Begin(), CurrentWriteFinished(), GetCurrentMedVol(), GetCurrentVol(), GetNextRecallSet(), GetReadStatus(), GetWriteStatus(), Next(), SetMedVol(), SetReadFinished(), SetWriteFinished(), and ValidDataSize().
UInt32_t pm_ReorgVolStatus::m_mediaKey [private] |
UInt32_t pm_ReorgVolStatus::m_blockSize [private] |
bool pm_ReorgVolStatus::m_initialized [private] |
bool pm_ReorgVolStatus::m_valid [private] |
pm_ReorgVolStatus::log_CLASSID_m [private] |
Definition at line 83 of file pm_reorgvolstatus.h.
1.5.6