Public Member Functions | Public Attributes

pm_VolStatus Class Reference
[G_new_group]

Created: 24.3.2004. More...

#include <pm_volstatus.h>

Collaboration diagram for pm_VolStatus:
Collaboration graph
[legend]

List of all members.

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

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 47 of file pm_volstatus.h.


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 71 of file pm_volstatus.cpp.

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

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 93 of file pm_volstatus.cpp.

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

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 110 of file pm_volstatus.cpp.

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

             :  m_medVol(a_medVol),
                m_mediaKey(a_mediaKey),
                m_blockSize(a_blockSize),
                m_readFinished(false), 
                m_writeFinished(false), 
                m_initFinished(false),
                m_writeStarted(false),
                m_validSize(a_diskBuffSize),
                m_readStatus(i_SUCCEDED),
                m_writeStatus(i_SUCCEDED),
                m_recallSetReader(  a_mediaKey, 
                                    a_medVol.medVolNr, 
                                    a_sourceMediaKey){
    log_FUNC_m(pm_VolStatus);
    log_DBG_m(dbg_NORM, "m_medVol:" << endl << ipc_Log::LogMediumVol(m_medVol));
   
}

Here is the call graph for this function:


Member Function Documentation

i_MediumVol_t pm_VolStatus::Get (  ) 

Definition at line 211 of file pm_volstatus.cpp.

References log_FUNC_m, and m_medVol.

                               {
    log_FUNC_m(Get);
    return m_medVol;
}

bool pm_VolStatus::IsInit (  ) 

Definition at line 149 of file pm_volstatus.cpp.

References dbg_DETAIL, log_DBG_m, log_FUNC_m, and m_initFinished.

                         {
    log_FUNC_m(IsInit);
    log_DBG_m(dbg_DETAIL, "m_initFinished:" << boolalpha << m_initFinished);
    return m_initFinished;
}

bool pm_VolStatus::IsRead (  ) 

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

                         {
    log_FUNC_m(IsRead);
    log_DBG_m(dbg_DETAIL, "m_readFinished:" << boolalpha << m_readFinished);
    return m_readFinished;
}

Here is the caller graph for this function:

bool pm_VolStatus::IsWrite (  ) 

Definition at line 141 of file pm_volstatus.cpp.

References dbg_DETAIL, log_DBG_m, log_FUNC_m, and m_writeFinished.

                          {
    log_FUNC_m(IsWrite);
    log_DBG_m(dbg_DETAIL, "m_writeFinished:" << boolalpha << m_writeFinished);

    return m_writeFinished;
}

bool pm_VolStatus::IsWriteStarted (  ) 

Definition at line 196 of file pm_volstatus.cpp.

References dbg_DETAIL, log_DBG_m, log_FUNC_m, and m_writeStarted.

                                 {
    log_FUNC_m(IsWriteStarted);

    log_DBG_m(dbg_DETAIL, "m_writeStarted:" << boolalpha << m_writeStarted);
    return m_writeStarted;
}

void pm_VolStatus::ReadFinished ( i_CompletionStatus_e  a_status  ) 

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

                                                            {
    log_FUNC_A_m(ReadFinished, "a_status:" << ipc_Log::LogStatus(a_status));

    m_recallSetReader.ReadFinished(a_status);

    // if all files from volume are recalled set
    // volume read status to true
    if (m_recallSetReader.EndOfCurrentVolume()) {
        m_readFinished = true;
    }

    if (a_status != i_SUCCEDED) {
        m_readStatus = a_status;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void pm_VolStatus::SetVolume ( i_MediumVol_t a_medVol  ) 

Definition at line 217 of file pm_volstatus.cpp.

References log_FUNC_m, and m_medVol.

                                                    {
    log_FUNC_m(Set);
    m_medVol = a_medVol;
}

bool pm_VolStatus::Succeded (  )  [inline]

Definition at line 71 of file pm_volstatus.h.

References i_SUCCEDED, m_readStatus, and m_writeStatus.

                    {
        return (m_readStatus == i_SUCCEDED) &&  (m_writeStatus == i_SUCCEDED);
    };

UInt32_t pm_VolStatus::ValidDataSize (  ) 

Definition at line 204 of file pm_volstatus.cpp.

References dbg_DETAIL, log_DBG_m, log_FUNC_m, and m_validSize.

void pm_VolStatus::WriteFinished ( i_CompletionStatus_e  a_status  ) 

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

                                                             {
    log_FUNC_A_m(WriteFinished, "a_status:" << ipc_Log::LogStatus(a_status));

    m_recallSetReader.WriteFinished(a_status);
    // if all files from volume are migrated set
    // volume write status to true
    if (m_recallSetReader.EndOfCurrentVolume()) {
        m_writeFinished = true;
    }
  
    if (a_status != i_SUCCEDED) {
        m_writeStatus = a_status;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void pm_VolStatus::WriteStarted (  ) 

Definition at line 189 of file pm_volstatus.cpp.

References log_FUNC_m, and m_writeStarted.

Referenced by i_ReorgJob_i::MigrateFiles().

Here is the caller graph for this function:


Member Data Documentation

Definition at line 104 of file pm_volstatus.h.

Definition at line 93 of file pm_volstatus.h.

Referenced by IsInit().

Definition at line 88 of file pm_volstatus.h.

Referenced by i_RedundantCopyJob_i::RecallFiles().

Definition at line 91 of file pm_volstatus.h.

Referenced by IsRead(), and ReadFinished().

Definition at line 101 of file pm_volstatus.h.

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

Definition at line 98 of file pm_volstatus.h.

Referenced by ValidDataSize().

Definition at line 92 of file pm_volstatus.h.

Referenced by IsWrite(), and WriteFinished().

Definition at line 95 of file pm_volstatus.h.

Referenced by IsWriteStarted(), and WriteStarted().

Definition at line 102 of file pm_volstatus.h.

Referenced by Succeded(), and WriteFinished().


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