Public Member Functions | Private Attributes

dbo_SetReorgScan Class Reference

#include <rm_dboperation.h>

Inheritance diagram for dbo_SetReorgScan:
Inheritance graph
[legend]
Collaboration diagram for dbo_SetReorgScan:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 dbo_SetReorgScan (string a_partName, rm_DBThread &a_DBThread)
virtual void Process ()

Private Attributes

string m_partName
 log_CLASSID_m

Detailed Description

Definition at line 1616 of file rm_dboperation.h.


Constructor & Destructor Documentation

dbo_SetReorgScan::dbo_SetReorgScan ( string  a_partName,
rm_DBThread a_DBThread 
)

Definition at line 1780 of file rm_dboperation.cpp.

                                                             : 

    rm_DBOperation(a_DBThread),
    m_partName(a_partName) {
    /*empty*/
}


Member Function Documentation

void dbo_SetReorgScan::Process (  )  [virtual]

Implements rm_DBOperation.

Definition at line 1788 of file rm_dboperation.cpp.

References rm_DBOperation::m_DBThread, m_partName, rm_DBThread::m_rmOp, rmdb_DATA_VOLUME, rmdb_MEDIUM_IN_USE, rmdb_MEDVOL_FULL, rm_Operator::SelectAllMediumVolByPart(), rm_Operator::SelectMedium(), i_Medium_t::status, and rm_Operator::Update().

                               {

    i_MediumSeqByVol_t medSeq = 
        m_DBThread.m_rmOp.SelectAllMediumVolByPart(m_partName, false);

    for (UInt32_t i(0); i < medSeq.length(); i++) {
        
        i_MediumVolSeq_t & medVolSeq = medSeq[i];
        i_Medium_t med = m_DBThread.m_rmOp.SelectMedium(
                                           string(medVolSeq[0].mediumBarcode));

        for (UInt32_t j(0); j < medVolSeq.length(); j++) {

            
            if ((medVolSeq[j].volType == rmdb_DATA_VOLUME) // set scanned status only for data volumes
                && !(medVolSeq[j].status & rmdb_MEDVOL_REORG_RECYCLED) // do not set scanned for recycled volumes
                &&
                (
                    (med.status & rmdb_MEDIUM_IN_USE) && // check if medium is in use? 
                    (medVolSeq[j].status & rmdb_MEDVOL_FULL) // IF yes: set scanned only for full volumes
                    
                    ||

                    !(med.status & rmdb_MEDIUM_IN_USE) && // medium is not in use
                    (    (medVolSeq[j].status & rmdb_MEDVOL_USED)
                      || (medVolSeq[j].status & rmdb_MEDVOL_FULL)) // set scanned for all used and full volumes
                )

               ) 
            {
                medVolSeq[j].status |= rmdb_MEDVOL_REORG_SCANNED;
                m_DBThread.m_rmOp.Update(medVolSeq[j]);
            }
        }
    }

}

Here is the call graph for this function:


Member Data Documentation

Reimplemented from rm_DBOperation.

Definition at line 1623 of file rm_dboperation.h.

string dbo_SetReorgScan::m_partName [private]

Definition at line 1622 of file rm_dboperation.h.

Referenced by Process().


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