pm_VolStatus Class Reference
[G_new_group]

#include <pm_volstatus.h>

Collaboration diagram for pm_VolStatus:

Collaboration graph
[legend]

List of all members.


Detailed Description

Created: 24.3.2004.

The pm_VolStatus class tracks the status of one volume that is reorganized

Author:
Toni Pljakoski

Definition at line 33 of file pm_volstatus.h.


Public Member Functions

 pm_VolStatus (i_MediumVol_t &a_medVol, UInt32_t a_mediaKey, string a_partName, UInt32_t a_blockSize)
 CTOR for reorganization.
 pm_VolStatus (i_MediumVol_t &a_medVol, UInt32_t a_blockSize, ivd_FileLocationData_t_v_i a_begin, ivd_FileLocationData_t_v_i a_end)
 CTOR for efficient recall.
 pm_VolStatus (i_MediumVol_t &a_medVol, UInt32_t a_mediaKey, UInt32_t a_blockSize, UInt64_t a_buffSize, UInt32_t a_sourceMediaKey)
 CTOR for redundant copy.
bool IsRead ()
bool IsWrite ()
bool IsInit ()
bool Succeded ()
void WriteStarted ()
bool IsWriteStarted ()
void ReadFinished (i_CompletionStatus_e a_status)
void WriteFinished (i_CompletionStatus_e a_status)
UInt32_t ValidDataSize ()
i_MediumVol_t Get ()
void SetVolume (i_MediumVol_t &a_medVol)

Public Attributes

i_MediumVol_t m_medVol
UInt32_t m_mediaKey
UInt32_t m_blockSize
bool m_readFinished
bool m_writeFinished
bool m_initFinished
bool m_writeStarted
UInt64_t m_validSize
i_CompletionStatus_e m_readStatus
i_CompletionStatus_e m_writeStatus
pm_RecallSetReader m_recallSetReader
 log_CLASSID_m

Constructor & Destructor Documentation

pm_VolStatus::pm_VolStatus ( i_MediumVol_t a_medVol,
UInt32_t  a_mediaKey,
string  a_partName,
UInt32_t  a_blockSize 
)

CTOR for reorganization.

Created: 24.3.2004.

pm_VolStatus CTOR

Parameters:
a_medVol Volume structure containing info about this volume
a_mediaKey media key of the volume
a_blockSize size of the block (dataformat)

Definition at line 57 of file pm_volstatus.cpp.

References dbg_NORM, log_DBG_m, log_FUNC_m, ipc_Log::LogMediumVol(), and m_medVol.

00061              :  m_medVol(a_medVol),
00062                 m_blockSize(a_blockSize),
00063                 m_readFinished(false), 
00064                 m_writeFinished(false), 
00065                 m_initFinished(false),
00066                 m_validSize(m_medVol.validData),
00067                 m_readStatus(i_SUCCEDED),
00068                 m_writeStatus(i_SUCCEDED),
00069                 m_recallSetReader(a_partName, 
00070                                   a_mediaKey, 
00071                                   a_medVol.medVolNr){
00072     log_FUNC_m(pm_VolStatus);
00073     log_DBG_m(dbg_NORM, "m_medVol:" << endl << ipc_Log::LogMediumVol(m_medVol));
00074     
00075 }

Here is the call graph for this function:

pm_VolStatus::pm_VolStatus ( i_MediumVol_t a_medVol,
UInt32_t  a_blockSize,
ivd_FileLocationData_t_v_i  a_begin,
ivd_FileLocationData_t_v_i  a_end 
)

CTOR for efficient recall.

Definition at line 79 of file pm_volstatus.cpp.

References dbg_NORM, log_DBG_m, log_FUNC_m, ipc_Log::LogMediumVol(), and m_medVol.

00083              :  m_medVol(a_medVol),
00084                 m_blockSize(a_blockSize),
00085                 m_readFinished(false), 
00086                 m_writeFinished(false), 
00087                 m_initFinished(false),
00088                 m_validSize(m_medVol.validData),
00089                 m_readStatus(i_SUCCEDED),
00090                 m_writeStatus(i_SUCCEDED),
00091                 m_recallSetReader(a_medVol.medVolNr, a_begin, a_end) {
00092     log_FUNC_m(pm_VolStatus);
00093     log_DBG_m(dbg_NORM, "m_medVol:" << endl << ipc_Log::LogMediumVol(m_medVol));    
00094 }

Here is the call graph for this function:

pm_VolStatus::pm_VolStatus ( i_MediumVol_t a_medVol,
UInt32_t  a_mediaKey,
UInt32_t  a_blockSize,
UInt64_t  a_buffSize,
UInt32_t  a_sourceMediaKey 
)

CTOR for redundant copy.

Definition at line 96 of file pm_volstatus.cpp.

References dbg_NORM, log_DBG_m, log_FUNC_m, ipc_Log::LogMediumVol(), and m_medVol.

00101              :  m_medVol(a_medVol),
00102                 m_mediaKey(a_mediaKey),
00103                 m_blockSize(a_blockSize),
00104                 m_readFinished(false), 
00105                 m_writeFinished(false), 
00106                 m_initFinished(false),
00107                 m_writeStarted(false),
00108                 m_validSize(a_diskBuffSize),
00109                 m_readStatus(i_SUCCEDED),
00110                 m_writeStatus(i_SUCCEDED),
00111                 m_recallSetReader(  a_mediaKey, 
00112                                     a_medVol.medVolNr, 
00113                                     a_sourceMediaKey){
00114     log_FUNC_m(pm_VolStatus);
00115     log_DBG_m(dbg_NORM, "m_medVol:" << endl << ipc_Log::LogMediumVol(m_medVol));
00116    
00117 }

Here is the call graph for this function:


Member Function Documentation

bool pm_VolStatus::IsRead (  ) 

Definition at line 120 of file pm_volstatus.cpp.

References dbg_DETAIL, log_DBG_m, log_FUNC_m, and m_readFinished.

Referenced by i_ReorgJob_i::Execute(), i_RedundantCopyJob_i::Execute(), and i_ReorgJob_i::MigrateFiles().

00120                          {
00121     log_FUNC_m(IsRead);
00122     log_DBG_m(dbg_DETAIL, "m_readFinished:" << boolalpha << m_readFinished);
00123     return m_readFinished;
00124 }

Here is the caller graph for this function:

bool pm_VolStatus::IsWrite (  ) 

Definition at line 127 of file pm_volstatus.cpp.

References dbg_DETAIL, log_DBG_m, log_FUNC_m, and m_writeFinished.

00127                           {
00128     log_FUNC_m(IsWrite);
00129     log_DBG_m(dbg_DETAIL, "m_writeFinished:" << boolalpha << m_writeFinished);
00130 
00131     return m_writeFinished;
00132 }

bool pm_VolStatus::IsInit (  ) 

Definition at line 135 of file pm_volstatus.cpp.

References dbg_DETAIL, log_DBG_m, log_FUNC_m, and m_initFinished.

00135                          {
00136     log_FUNC_m(IsInit);
00137     log_DBG_m(dbg_DETAIL, "m_initFinished:" << boolalpha << m_initFinished);
00138     return m_initFinished;
00139 }

bool pm_VolStatus::Succeded (  )  [inline]

Definition at line 57 of file pm_volstatus.h.

References i_SUCCEDED, m_readStatus, and m_writeStatus.

00057                     {
00058         return (m_readStatus == i_SUCCEDED) &&  (m_writeStatus == i_SUCCEDED);
00059     };

void pm_VolStatus::WriteStarted (  ) 

Definition at line 175 of file pm_volstatus.cpp.

References log_FUNC_m, and m_writeStarted.

Referenced by i_ReorgJob_i::MigrateFiles().

00175                                {
00176     log_FUNC_m(WriteStarted);
00177 
00178     m_writeStarted = true;
00179 }

Here is the caller graph for this function:

bool pm_VolStatus::IsWriteStarted (  ) 

Definition at line 182 of file pm_volstatus.cpp.

References dbg_DETAIL, log_DBG_m, log_FUNC_m, and m_writeStarted.

Referenced by i_ReorgJob_i::~i_ReorgJob_i().

00182                                  {
00183     log_FUNC_m(IsWriteStarted);
00184 
00185     log_DBG_m(dbg_DETAIL, "m_writeStarted:" << boolalpha << m_writeStarted);
00186     return m_writeStarted;
00187 }

Here is the caller graph for this function:

void pm_VolStatus::ReadFinished ( i_CompletionStatus_e  a_status  ) 

Definition at line 142 of file pm_volstatus.cpp.

References pm_RecallSetReader::EndOfCurrentVolume(), i_SUCCEDED, log_FUNC_A_m, ipc_Log::LogStatus(), m_readFinished, m_readStatus, m_recallSetReader, and pm_RecallSetReader::ReadFinished().

Referenced by i_EfficientRecallJob_i::MediumOperationComplete().

00142                                                             {
00143     log_FUNC_A_m(ReadFinished, "a_status:" << ipc_Log::LogStatus(a_status));
00144 
00145     m_recallSetReader.ReadFinished(a_status);
00146 
00147     // if all files from volume are recalled set
00148     // volume read status to true
00149     if (m_recallSetReader.EndOfCurrentVolume()) {
00150         m_readFinished = true;
00151     }
00152 
00153     if (a_status != i_SUCCEDED) {
00154         m_readStatus = a_status;
00155     }
00156 }

Here is the call graph for this function:

Here is the caller graph for this function:

void pm_VolStatus::WriteFinished ( i_CompletionStatus_e  a_status  ) 

Definition at line 159 of file pm_volstatus.cpp.

References pm_RecallSetReader::EndOfCurrentVolume(), i_SUCCEDED, log_FUNC_A_m, ipc_Log::LogStatus(), m_recallSetReader, m_writeFinished, m_writeStatus, and pm_RecallSetReader::WriteFinished().

Referenced by i_EfficientRecallJob_i::MediumOperationComplete().

00159                                                              {
00160     log_FUNC_A_m(WriteFinished, "a_status:" << ipc_Log::LogStatus(a_status));
00161 
00162     m_recallSetReader.WriteFinished(a_status);
00163     // if all files from volume are migrated set
00164     // volume write status to true
00165     if (m_recallSetReader.EndOfCurrentVolume()) {
00166         m_writeFinished = true;
00167     }
00168   
00169     if (a_status != i_SUCCEDED) {
00170         m_writeStatus = a_status;
00171     }
00172 }

Here is the call graph for this function:

Here is the caller graph for this function:

UInt32_t pm_VolStatus::ValidDataSize (  ) 

Definition at line 190 of file pm_volstatus.cpp.

References dbg_DETAIL, log_DBG_m, log_FUNC_m, and m_validSize.

00190                                     {
00191     log_FUNC_m(ValidDataSize);
00192     log_DBG_m(dbg_DETAIL, "m_validSize:" << m_validSize);
00193     return m_validSize;
00194 }

i_MediumVol_t pm_VolStatus::Get (  ) 

Definition at line 197 of file pm_volstatus.cpp.

References log_FUNC_m, and m_medVol.

00197                                {
00198     log_FUNC_m(Get);
00199     return m_medVol;
00200 }

void pm_VolStatus::SetVolume ( i_MediumVol_t a_medVol  ) 

Definition at line 203 of file pm_volstatus.cpp.

References log_FUNC_m, and m_medVol.

00203                                                     {
00204     log_FUNC_m(Set);
00205     m_medVol = a_medVol;
00206 }


Member Data Documentation

Definition at line 74 of file pm_volstatus.h.

Referenced by i_RedundantCopyJob_i::RecallFiles().

Definition at line 77 of file pm_volstatus.h.

Referenced by IsRead(), and ReadFinished().

Definition at line 78 of file pm_volstatus.h.

Referenced by IsWrite(), and WriteFinished().

Definition at line 79 of file pm_volstatus.h.

Referenced by IsInit().

Definition at line 81 of file pm_volstatus.h.

Referenced by IsWriteStarted(), and WriteStarted().

Definition at line 84 of file pm_volstatus.h.

Referenced by ValidDataSize().

Definition at line 87 of file pm_volstatus.h.

Referenced by ReadFinished(), i_RedundantCopyJob_i::RecallFiles(), and Succeded().

Definition at line 88 of file pm_volstatus.h.

Referenced by Succeded(), and WriteFinished().

Definition at line 90 of file pm_volstatus.h.


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

Generated on Mon Feb 27 19:45:50 2012 for OPENARCHIVE by  doxygen 1.5.6