Public Member Functions | Private Attributes

pm_ReorgVolStatus Class Reference
[G_new_group]

#include <pm_reorgvolstatus.h>

List of all members.

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_tGetNextRecallSet ()
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_tGetMedVol (UInt32_t a_num)
void SetMedVol (i_MediumVol_t &a_medVol)
pm_VolStatusGetCurrentMedVol ()
UInt32_t NumOfVol ()
i_MediumVol_t GetCurrentVol ()
void GetAllReorgVol (vector< i_MediumVol_t > &volumes)
i_CompletionStatus_e GetReadStatus ()
i_CompletionStatus_e GetWriteStatus ()
bool IsWriteStarted (i_Index_t &a_volumeNumber)

Private Attributes

string m_partName
vector< pm_VolStatusm_vol
UInt32_t m_currentVol
UInt32_t m_mediaKey
UInt32_t m_blockSize
bool m_initialized
bool m_valid
 log_CLASSID_m

Detailed Description

Definition at line 44 of file pm_reorgvolstatus.h.


Constructor & Destructor Documentation

pm_ReorgVolStatus::pm_ReorgVolStatus ( string  a_partName  ) 

Definition at line 47 of file pm_reorgvolstatus.cpp.

                                                      :
    m_partName(a_partName),
    m_currentVol(0),
    m_initialized(false),
    m_valid(false){
    //empty
}

pm_ReorgVolStatus::~pm_ReorgVolStatus (  ) 

Definition at line 57 of file pm_reorgvolstatus.cpp.

                                     {
    //empty
}


Member Function Documentation

bool pm_ReorgVolStatus::AllSuccess (  ) 

Definition at line 125 of file pm_reorgvolstatus.cpp.

References i_SUCCEDED, log_FUNC_m, and m_vol.

                                  {
    log_FUNC_m(AllSuccess);
    for (UInt32_t i(0); i < m_vol.size(); i++){
        if (m_vol[i].m_writeStatus == i_SUCCEDED){
            continue;
        } else {
            return false;
        }
    } //for
    return true;
}

void pm_ReorgVolStatus::Begin (  )  [inline]

Definition at line 66 of file pm_reorgvolstatus.h.

References m_currentVol.

Referenced by i_ReorgJob_i::Execute(), and i_ReorgJob_i::InitializeVolumes().

                {
        m_currentVol = 0;
    }

Here is the caller graph for this function:

void pm_ReorgVolStatus::Check ( UInt32_t  a_num  ) 

Definition at line 71 of file pm_reorgvolstatus.cpp.

References ie_FATAL_ERROR, and m_vol.

Referenced by GetCurrentMedVol(), GetCurrentVol(), GetMedVol(), GetNextRecallSet(), SetMedVol(), SetReadFinished(), SetWriteFinished(), and ValidDataSize().

                                           {
    if(a_num >= m_vol.size()){
        throw ivd_InternalError(ie_FATAL_ERROR, 
            "BUG: Accessing unexisting vector element.");
    }
}

Here is the caller graph for this function:

bool pm_ReorgVolStatus::CurrentWriteFinished (  ) 

Definition at line 105 of file pm_reorgvolstatus.cpp.

References m_currentVol, and m_vol.

                                            {
    return m_vol[m_currentVol].IsWrite();
}

void pm_ReorgVolStatus::GetAllReorgVol ( vector< i_MediumVol_t > &  volumes  ) 

Definition at line 205 of file pm_reorgvolstatus.cpp.

References log_FUNC_m, and m_vol.

Referenced by i_ReorgJob_i::~i_ReorgJob_i().

                                                                        {
    log_FUNC_m(GetAllReorgVol);
    for (UInt32_t i = 0; i < m_vol.size(); i++) {
        a_volumes.push_back(m_vol[i].m_medVol);
    }
}

Here is the caller graph for this function:

pm_VolStatus & pm_ReorgVolStatus::GetCurrentMedVol (  ) 

Definition at line 198 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(), and i_ReorgJob_i::RecallFiles().

Here is the call graph for this function:

Here is the caller graph for this function:

i_MediumVol_t pm_ReorgVolStatus::GetCurrentVol (  ) 

Definition at line 191 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().

Here is the call graph for this function:

Here is the caller graph for this function:

i_MediumVol_t & pm_ReorgVolStatus::GetMedVol ( UInt32_t  a_num  ) 

Definition at line 172 of file pm_reorgvolstatus.cpp.

References Check(), and m_vol.

                                                         {
    Check(a_num);
    return m_vol[a_num].m_medVol;
}

Here is the call graph for this function:

i_FileLocationDataList_t * pm_ReorgVolStatus::GetNextRecallSet (  ) 

Definition at line 80 of file pm_reorgvolstatus.cpp.

References Check(), m_currentVol, and m_vol.

                                                              {
    Check(m_currentVol);
    return m_vol[m_currentVol].m_recallSetReader.GetNextRecallSet();
}

Here is the call graph for this function:

i_CompletionStatus_e pm_ReorgVolStatus::GetReadStatus (  )  [inline]

Definition at line 80 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().

                                        {
        return m_vol[m_currentVol].m_readStatus;
    };

Here is the caller graph for this function:

i_CompletionStatus_e pm_ReorgVolStatus::GetWriteStatus (  )  [inline]

Definition at line 84 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().

                                         {
        return m_vol[m_currentVol].m_writeStatus;
    };

Here is the caller graph for this function:

void pm_ReorgVolStatus::Init ( UInt32_t  a_mediaKey,
UInt32_t  a_blockSize 
)

Definition at line 63 of file pm_reorgvolstatus.cpp.

References m_blockSize, m_initialized, and m_mediaKey.

Referenced by i_ReorgJob_i::i_ReorgJob_i().

                                                                     {
    m_mediaKey = a_mediaKey;
    m_blockSize = a_blockSize;
    m_initialized = true;
}

Here is the caller graph for this function:

void pm_ReorgVolStatus::Insert ( i_MediumVol_t a_medVol  ) 

Definition at line 156 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().

                                                     {
    log_FUNC_m(Insert);
    if (!m_initialized){
        throw ivd_InternalError(ie_FATAL_ERROR,"m_ReorgVolStatus not initialized.");
    }
    m_vol.push_back(pm_VolStatus(   a_medVol, 
                                    m_mediaKey, 
                                    m_partName, 
                                    m_blockSize));
    m_valid = true;
    log_DBG_m(dbg_NORM, " m_vol: new element inserted. Size: " << m_vol.size() <<
                        " location: " << &m_vol[m_vol.size() - 1]);
}

Here is the caller graph for this function:

bool pm_ReorgVolStatus::IsAllWriteFinished (  ) 

Definition at line 111 of file pm_reorgvolstatus.cpp.

References log_FUNC_m, and m_vol.

                                          {
    log_FUNC_m(IsAllWriteFinished);
    for (UInt32_t i(0); i < m_vol.size(); i++){
        if (m_vol[i].IsWrite()){
            continue;
        } else {
            return false;
        }
    } //for
    return true;
}

bool pm_ReorgVolStatus::IsWriteStarted ( i_Index_t a_volumeNumber  ) 

Definition at line 214 of file pm_reorgvolstatus.cpp.

References dbg_DETAIL, log_DBG_m, log_FUNC_m, and m_vol.

Referenced by i_ReorgJob_i::~i_ReorgJob_i().

                                                                {
    log_FUNC_m(IsWriteStarted);
    for (UInt32_t i = 0; i < m_vol.size(); i++) {
        log_DBG_m(dbg_DETAIL, "m_vol[i].m_medVol.medVolNr: " << m_vol[i].m_medVol.medVolNr
                << ", a_volumeNumber: " << a_volumeNumber);
        if (m_vol[i].m_medVol.medVolNr == a_volumeNumber) {
            return m_vol[i].IsWriteStarted();
        }
    }
    log_DBG_m(dbg_DETAIL, "Volume " << a_volumeNumber << " not found.");
    return false;
}

Here is the caller graph for this function:

void pm_ReorgVolStatus::Next (  ) 

Definition at line 139 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(), and i_ReorgJob_i::RecallFiles().

                            {
    log_FUNC_m(Next);
    if (++m_currentVol >= m_vol.size()){
        m_valid = false;
        throw ivd_Error(ie_VOL_NOT_FOUND);
    }
}

Here is the caller graph for this function:

UInt32_t pm_ReorgVolStatus::NumOfVol (  ) 

Definition at line 186 of file pm_reorgvolstatus.cpp.

References m_vol.

Referenced by i_ReorgJob_i::i_ReorgJob_i().

                                    {
    return m_vol.size();
}

Here is the caller graph for this function:

void pm_ReorgVolStatus::SetMedVol ( i_MediumVol_t a_medVol  ) 

Definition at line 179 of file pm_reorgvolstatus.cpp.

References Check(), m_currentVol, and m_vol.

Referenced by i_ReorgJob_i::RecallFiles().

                                                          {
    Check(m_currentVol);
    return m_vol[m_currentVol].SetVolume(a_medVol);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void pm_ReorgVolStatus::SetReadFinished ( i_CompletionStatus_e  a_status  ) 

Definition at line 87 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().

                                                                    {
    Check(m_currentVol);
    m_vol[m_currentVol].ReadFinished(a_status);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void pm_ReorgVolStatus::SetWriteFinished ( i_CompletionStatus_e  a_status  ) 

Definition at line 94 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().

                                                                     {
    Check(m_currentVol);
    if (!m_vol[m_currentVol].m_recallSetReader.IsReadFinished()){
        throw ivd_InternalError(ie_FATAL_ERROR, 
            "BUG: Data set not written!");
    }
    m_vol[m_currentVol].WriteFinished(a_status);
}

Here is the call graph for this function:

Here is the caller graph for this function:

UInt32_t pm_ReorgVolStatus::ValidDataSize (  ) 

Definition at line 149 of file pm_reorgvolstatus.cpp.

References Check(), m_currentVol, and m_vol.

Referenced by i_ReorgJob_i::DiskBufferCleanup(), and i_ReorgJob_i::Execute().

                                         {
    Check(m_currentVol);
    return m_vol[m_currentVol].ValidDataSize();
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 98 of file pm_reorgvolstatus.h.

Definition at line 94 of file pm_reorgvolstatus.h.

Referenced by Init(), and Insert().

Definition at line 95 of file pm_reorgvolstatus.h.

Referenced by Init(), and Insert().

Definition at line 93 of file pm_reorgvolstatus.h.

Referenced by Init(), and Insert().

Definition at line 90 of file pm_reorgvolstatus.h.

Referenced by Insert().

Definition at line 96 of file pm_reorgvolstatus.h.

Referenced by Insert(), and Next().


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