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.


Detailed Description

Definition at line 1600 of file rm_dboperation.h.


Public Member Functions

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

Private Attributes

string m_partName
 log_CLASSID_m

Constructor & Destructor Documentation

dbo_SetReorgScan::dbo_SetReorgScan ( string  a_partName,
rm_DBThread a_DBThread 
)

Definition at line 1766 of file rm_dboperation.cpp.

01767                                                              : 
01768 
01769     rm_DBOperation(a_DBThread),
01770     m_partName(a_partName) {
01771     /*empty*/
01772 }


Member Function Documentation

void dbo_SetReorgScan::Process (  )  [virtual]

Implements rm_DBOperation.

Definition at line 1774 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, rmdb_MEDVOL_REORG_RECYCLED, rmdb_MEDVOL_REORG_SCANNED, rmdb_MEDVOL_USED, rm_Operator::SelectAllMediumVolByPart(), rm_Operator::SelectMedium(), i_Medium_t::status, and rm_Operator::Update().

01774                                {
01775 
01776     i_MediumSeqByVol_t medSeq = 
01777         m_DBThread.m_rmOp.SelectAllMediumVolByPart(m_partName, false);
01778 
01779     for (UInt32_t i(0); i < medSeq.length(); i++) {
01780         
01781         i_MediumVolSeq_t & medVolSeq = medSeq[i];
01782         i_Medium_t med = m_DBThread.m_rmOp.SelectMedium(
01783                                            string(medVolSeq[0].mediumBarcode));
01784 
01785         for (UInt32_t j(0); j < medVolSeq.length(); j++) {
01786 
01787             
01788             if ((medVolSeq[j].volType == rmdb_DATA_VOLUME) // set scanned status only for data volumes
01789                 && !(medVolSeq[j].status & rmdb_MEDVOL_REORG_RECYCLED) // do not set scanned for recycled volumes
01790                 &&
01791                 (
01792                     (med.status & rmdb_MEDIUM_IN_USE) && // check if medium is in use? 
01793                     (medVolSeq[j].status & rmdb_MEDVOL_FULL) // IF yes: set scanned only for full volumes
01794                     
01795                     ||
01796 
01797                     !(med.status & rmdb_MEDIUM_IN_USE) && // medium is not in use
01798                     (    (medVolSeq[j].status & rmdb_MEDVOL_USED)
01799                       || (medVolSeq[j].status & rmdb_MEDVOL_FULL)) // set scanned for all used and full volumes
01800                 )
01801 
01802                ) 
01803             {
01804                 medVolSeq[j].status |= rmdb_MEDVOL_REORG_SCANNED;
01805                 m_DBThread.m_rmOp.Update(medVolSeq[j]);
01806             }
01807         }
01808     }
01809 
01810 }

Here is the call graph for this function:


Member Data Documentation

string dbo_SetReorgScan::m_partName [private]

Definition at line 1606 of file rm_dboperation.h.

Referenced by Process().

Reimplemented from rm_DBOperation.

Definition at line 1607 of file rm_dboperation.h.


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

Generated on Mon Feb 27 19:10:41 2012 for OPENARCHIVE by  doxygen 1.5.6