Public Member Functions | Public Attributes | Private Attributes | Friends

rm_PartitionStatus Class Reference
[Resource Manager]

#include <rm.h>

Collaboration diagram for rm_PartitionStatus:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 rm_PartitionStatus (string a_partName, UInt32_t a_maxDrives, UInt32_t a_maxDrivesRecall, UInt32_t a_maxDrivesMig, UInt32_t a_maxDrivesReorg, UInt32_t a_maxDrivesRecovery, UInt32_t a_maxDrivesMaint, UInt32_t a_reservedDrives, UInt32_t a_reservedDrivesRecall, UInt32_t a_reservedDrivesMig, UInt32_t a_reservedDrivesReorg, UInt32_t a_reservedDrivesRecovery, UInt32_t a_reservedDrivesMaint, UInt32_t a_partitionPriority, UInt32_t a_migrationPriority, UInt32_t a_recallPriority, UInt32_t a_reorgPriority, UInt32_t a_recoveryPriority, UInt32_t a_maintPriority, i_ResourceManager_i *a_iRMi)
 ~rm_PartitionStatus ()
void Init (string a_partName, UInt32_t a_maxDrives, UInt32_t a_maxDrivesRecall, UInt32_t a_maxDrivesMig, UInt32_t a_maxDrivesReorg, UInt32_t a_maxDrivesRecovery, UInt32_t a_maxDrivesMaint, UInt32_t a_reservedDrives, UInt32_t a_reservedDrivesRecall, UInt32_t a_reservedDrivesMig, UInt32_t a_reservedDrivesReorg, UInt32_t a_reservedDrivesRecovery, UInt32_t a_reservedDrivesMaint, UInt32_t a_partitionPriority, UInt32_t a_migrationPriority, UInt32_t a_recallPriority, UInt32_t a_reorgPriority, UInt32_t a_recoveryPriority, UInt32_t a_maintPriority)
void Update (const rm_PartitionStatus &a_fromPM)
bool Reserve (ivd_JobType_e a_type, UInt32_t a_number)
void Release (ivd_JobType_e a_type, UInt32_t a_number)
string GetPartName () const
cmn_UUID_t GetPartUUID () const
Int32_t GetMaxDrives () const
Int32_t GetMaxDrivesRecall () const
Int32_t GetMaxDrivesMig () const
Int32_t GetMaxDrivesReorg () const
Int32_t GetMaxDrivesRecovery () const
Int32_t GetMaxDrivesMaint () const
Int32_t GetDrivesInUse () const
Int32_t GetDrivesInUseRecall () const
Int32_t GetDrivesInUseMig () const
Int32_t GetDrivesInUseReorg () const
Int32_t GetDrivesInUseRecovery () const
Int32_t GetDrivesInUseMaint () const
Int32_t GetReservedDrives () const
Int32_t GetReservedDrivesRecall () const
Int32_t GetReservedDrivesMig () const
Int32_t GetReservedDrivesReorg () const
Int32_t GetReservedDrivesRecovery () const
Int32_t GetReservedDrivesMaint () const
Int32_t GetPartitionPriority () const
Int32_t GetMigrationPriority () const
Int32_t GetRecallPriority () const
Int32_t GetReorgPriority () const
Int32_t GetRecoveryPriority () const
Int32_t GetMaintPriority () const
void LogCurrentState ()

Public Attributes

rm_Partition m_part

Private Attributes

string m_partName
UInt32_t m_maxDrives
UInt32_t m_maxDrivesRecall
UInt32_t m_maxDrivesMig
UInt32_t m_maxDrivesReorg
UInt32_t m_maxDrivesRecovery
UInt32_t m_maxDrivesMaint
UInt32_t m_drivesInUse
UInt32_t m_drivesInUseRecall
UInt32_t m_drivesInUseMig
UInt32_t m_drivesInUseReorg
UInt32_t m_drivesInUseRecovery
UInt32_t m_drivesInUseMaint
UInt32_t m_reservedDrives
UInt32_t m_reservedDrivesRecall
UInt32_t m_reservedDrivesMig
UInt32_t m_reservedDrivesReorg
UInt32_t m_reservedDrivesRecovery
UInt32_t m_reservedDrivesMaint
UInt32_t m_partitionPriority
UInt32_t m_migrationPriority
UInt32_t m_recallPriority
UInt32_t m_reorgPriority
UInt32_t m_recoveryPriority
UInt32_t m_maintPriority
i_ResourceManager_im_iRMi
 log_CLASSID_m

Friends

class rm_SysState

Detailed Description

Definition at line 40 of file rm.h.


Constructor & Destructor Documentation

rm_PartitionStatus::rm_PartitionStatus ( string  a_partName,
UInt32_t  a_maxDrives,
UInt32_t  a_maxDrivesRecall,
UInt32_t  a_maxDrivesMig,
UInt32_t  a_maxDrivesReorg,
UInt32_t  a_maxDrivesRecovery,
UInt32_t  a_maxDrivesMaint,
UInt32_t  a_reservedDrives,
UInt32_t  a_reservedDrivesRecall,
UInt32_t  a_reservedDrivesMig,
UInt32_t  a_reservedDrivesReorg,
UInt32_t  a_reservedDrivesRecovery,
UInt32_t  a_reservedDrivesMaint,
UInt32_t  a_partitionPriority,
UInt32_t  a_migrationPriority,
UInt32_t  a_recallPriority,
UInt32_t  a_reorgPriority,
UInt32_t  a_recoveryPriority,
UInt32_t  a_maintPriority,
i_ResourceManager_i a_iRMi 
)

Definition at line 46 of file rm_partstate.cpp.

References rm_DBOperation::Execute(), i_ResourceManager_i::m_DBThread, m_iRMi, m_part, and m_partName.

        :   
            m_partName(a_partName),
            m_maxDrives(a_maxDrives),
            m_maxDrivesRecall(a_maxDrivesRecall),
            m_maxDrivesMig(a_maxDrivesMig),
            m_maxDrivesReorg(a_maxDrivesReorg),
            m_maxDrivesRecovery(a_maxDrivesRecovery),
            m_maxDrivesMaint(a_maxDrivesMaint),

            m_drivesInUse(0),
            m_drivesInUseRecall(0),
            m_drivesInUseMig(0),
            m_drivesInUseReorg(0),
            m_drivesInUseRecovery(0),
            m_drivesInUseMaint(0),
            
            m_reservedDrives(a_reservedDrives),
            m_reservedDrivesRecall(a_reservedDrivesRecall),
            m_reservedDrivesMig(a_reservedDrivesMig),
            m_reservedDrivesReorg(a_reservedDrivesReorg),
            m_reservedDrivesRecovery(a_reservedDrivesRecovery),

            m_partitionPriority(a_partitionPriority),
            m_migrationPriority(a_migrationPriority),
            m_recallPriority(a_recallPriority),
            m_reorgPriority(a_reorgPriority),
            m_recoveryPriority(a_recoveryPriority),
            m_maintPriority(a_maintPriority),
            m_iRMi(a_iRMi)
            
             { 
    
    dbo_InitPartition ip(m_partName, m_part, *(m_iRMi->m_DBThread));
    ip.Execute();
}

Here is the call graph for this function:

rm_PartitionStatus::~rm_PartitionStatus (  )  [inline]

Definition at line 71 of file rm.h.

{};


Member Function Documentation

Int32_t rm_PartitionStatus::GetDrivesInUse (  )  const [inline]

Definition at line 112 of file rm.h.

References m_drivesInUse.

{ return m_drivesInUse;         };

Int32_t rm_PartitionStatus::GetDrivesInUseMaint (  )  const [inline]

Definition at line 117 of file rm.h.

References m_drivesInUseMaint.

{ return m_drivesInUseMaint; };

Int32_t rm_PartitionStatus::GetDrivesInUseMig (  )  const [inline]

Definition at line 114 of file rm.h.

References m_drivesInUseMig.

{ return m_drivesInUseMig;      };

Int32_t rm_PartitionStatus::GetDrivesInUseRecall (  )  const [inline]

Definition at line 113 of file rm.h.

References m_drivesInUseRecall.

{ return m_drivesInUseRecall;   };

Int32_t rm_PartitionStatus::GetDrivesInUseRecovery (  )  const [inline]

Definition at line 116 of file rm.h.

References m_drivesInUseRecovery.

{ return m_drivesInUseRecovery; };

Int32_t rm_PartitionStatus::GetDrivesInUseReorg (  )  const [inline]

Definition at line 115 of file rm.h.

References m_drivesInUseReorg.

{ return m_drivesInUseReorg;    };

Int32_t rm_PartitionStatus::GetMaintPriority (  )  const [inline]

Definition at line 131 of file rm.h.

References m_maintPriority.

{ return m_maintPriority;    };

Int32_t rm_PartitionStatus::GetMaxDrives (  )  const [inline]

Definition at line 105 of file rm.h.

References m_maxDrives.

{ return m_maxDrives;           };

Int32_t rm_PartitionStatus::GetMaxDrivesMaint (  )  const [inline]

Definition at line 110 of file rm.h.

References m_maxDrivesMaint.

{ return m_maxDrivesMaint;   };

Int32_t rm_PartitionStatus::GetMaxDrivesMig (  )  const [inline]

Definition at line 107 of file rm.h.

References m_maxDrivesMig.

{ return m_maxDrivesMig;        };

Int32_t rm_PartitionStatus::GetMaxDrivesRecall (  )  const [inline]

Definition at line 106 of file rm.h.

References m_maxDrivesRecall.

{ return m_maxDrivesRecall;     };

Int32_t rm_PartitionStatus::GetMaxDrivesRecovery (  )  const [inline]

Definition at line 109 of file rm.h.

References m_maxDrivesRecovery.

{ return m_maxDrivesRecovery;   };

Int32_t rm_PartitionStatus::GetMaxDrivesReorg (  )  const [inline]

Definition at line 108 of file rm.h.

References m_maxDrivesReorg.

{ return m_maxDrivesReorg;      };

Int32_t rm_PartitionStatus::GetMigrationPriority (  )  const [inline]

Definition at line 127 of file rm.h.

References m_migrationPriority.

{ return m_migrationPriority;   };

Int32_t rm_PartitionStatus::GetPartitionPriority (  )  const [inline]

Definition at line 126 of file rm.h.

References m_partitionPriority.

{ return m_partitionPriority;   };

string rm_PartitionStatus::GetPartName (  )  const [inline]

Definition at line 102 of file rm.h.

References m_partName.

Referenced by i_ResourceManager_i::SetRMPartStatus(), and rm_SysState::UpdatePM().

{ return m_partName;            };

Here is the caller graph for this function:

cmn_UUID_t rm_PartitionStatus::GetPartUUID (  )  const [inline]

Definition at line 103 of file rm.h.

References m_part, and rm_Partition::partUUID.

Referenced by i_ResourceManager_i::SetRMPartStatus().

{ return m_part.partUUID;       };

Here is the caller graph for this function:

Int32_t rm_PartitionStatus::GetRecallPriority (  )  const [inline]

Definition at line 128 of file rm.h.

References m_recallPriority.

{ return m_recallPriority;      };

Int32_t rm_PartitionStatus::GetRecoveryPriority (  )  const [inline]

Definition at line 130 of file rm.h.

References m_recoveryPriority.

{ return m_recoveryPriority;    };

Int32_t rm_PartitionStatus::GetReorgPriority (  )  const [inline]

Definition at line 129 of file rm.h.

References m_reorgPriority.

{ return m_reorgPriority;       };

Int32_t rm_PartitionStatus::GetReservedDrives (  )  const [inline]

Definition at line 119 of file rm.h.

References m_reservedDrives.

{ return m_reservedDrives;      };

Int32_t rm_PartitionStatus::GetReservedDrivesMaint (  )  const [inline]

Definition at line 124 of file rm.h.

References m_reservedDrivesMaint.

{ return m_reservedDrivesMaint; };

Int32_t rm_PartitionStatus::GetReservedDrivesMig (  )  const [inline]

Definition at line 121 of file rm.h.

References m_reservedDrivesMig.

{ return m_reservedDrivesMig;   };

Int32_t rm_PartitionStatus::GetReservedDrivesRecall (  )  const [inline]

Definition at line 120 of file rm.h.

References m_reservedDrivesRecall.

Int32_t rm_PartitionStatus::GetReservedDrivesRecovery (  )  const [inline]

Definition at line 123 of file rm.h.

References m_reservedDrivesRecovery.

Int32_t rm_PartitionStatus::GetReservedDrivesReorg (  )  const [inline]

Definition at line 122 of file rm.h.

References m_reservedDrivesReorg.

{ return m_reservedDrivesReorg; };

void rm_PartitionStatus::Init ( string  a_partName,
UInt32_t  a_maxDrives,
UInt32_t  a_maxDrivesRecall,
UInt32_t  a_maxDrivesMig,
UInt32_t  a_maxDrivesReorg,
UInt32_t  a_maxDrivesRecovery,
UInt32_t  a_maxDrivesMaint,
UInt32_t  a_reservedDrives,
UInt32_t  a_reservedDrivesRecall,
UInt32_t  a_reservedDrivesMig,
UInt32_t  a_reservedDrivesReorg,
UInt32_t  a_reservedDrivesRecovery,
UInt32_t  a_reservedDrivesMaint,
UInt32_t  a_partitionPriority,
UInt32_t  a_migrationPriority,
UInt32_t  a_recallPriority,
UInt32_t  a_reorgPriority,
UInt32_t  a_recoveryPriority,
UInt32_t  a_maintPriority 
)

Definition at line 174 of file rm_partstate.cpp.

References rm_MigIdGen::Init(), log_FUNC_m, m_drivesInUse, m_drivesInUseMaint, m_drivesInUseMig, m_drivesInUseRecall, m_drivesInUseRecovery, m_drivesInUseReorg, m_maintPriority, m_maxDrives, m_maxDrivesMaint, m_maxDrivesMig, m_maxDrivesRecall, m_maxDrivesRecovery, m_maxDrivesReorg, rm_Partition::m_migIdGen, m_migrationPriority, m_part, m_partitionPriority, m_partName, m_recallPriority, m_recoveryPriority, m_reorgPriority, m_reservedDrives, m_reservedDrivesMaint, m_reservedDrivesMig, m_reservedDrivesRecall, m_reservedDrivesRecovery, and m_reservedDrivesReorg.

                                         {
    
    log_FUNC_m(Init);
    m_partName              = a_partName;
    m_maxDrives             = a_maxDrives ;
    m_maxDrivesRecall       = a_maxDrivesRecall ;
    m_maxDrivesMig          = a_maxDrivesMig ;
    m_maxDrivesReorg        = a_maxDrivesReorg ;
    m_maxDrivesRecovery     = a_maxDrivesRecovery ;
    m_maxDrivesMaint        = a_maxDrivesMaint ;
    
    m_drivesInUse           = 0;
    m_drivesInUseRecall     = 0;
    m_drivesInUseMig        = 0;
    m_drivesInUseReorg      = 0;
    m_drivesInUseRecovery   = 0;
    m_drivesInUseMaint      = 0;
    
    m_reservedDrives        = a_reservedDrives ;
    m_reservedDrivesRecall  = a_reservedDrivesRecall ;
    m_reservedDrivesMig     = a_reservedDrivesMig ;
    m_reservedDrivesReorg   = a_reservedDrivesReorg ;
    m_reservedDrivesRecovery= a_reservedDrivesRecovery ;
    m_reservedDrivesMaint   = a_reservedDrivesMaint ;

    m_partitionPriority     = a_partitionPriority;
    m_migrationPriority     = a_migrationPriority;
    m_recallPriority        = a_recallPriority;
    m_reorgPriority         = a_reorgPriority;
    m_recoveryPriority      = a_recoveryPriority;
    m_maintPriority         = a_maintPriority;

    m_part.m_migIdGen.Init(&m_part);
}

Here is the call graph for this function:

void rm_PartitionStatus::LogCurrentState (  ) 

Definition at line 366 of file rm_partstate.cpp.

References dbg_DETAIL, log_DBG_m, log_FUNC_m, m_drivesInUse, m_drivesInUseMaint, m_drivesInUseMig, m_drivesInUseRecall, m_drivesInUseRecovery, m_drivesInUseReorg, m_maintPriority, m_maxDrives, m_maxDrivesMaint, m_maxDrivesMig, m_maxDrivesRecall, m_maxDrivesRecovery, m_maxDrivesReorg, m_migrationPriority, m_part, m_partitionPriority, m_partName, m_recallPriority, m_recoveryPriority, m_reorgPriority, rm_Partition::partitionName, rm_Partition::partitionUUIDString, and rm_Partition::partUUID.

Referenced by Release(), Reserve(), i_ResourceManager_i::SetRMPartStatus(), and rm_SysState::UpdatePM().

                                        {
    log_FUNC_m(LogCurrentState);

    log_DBG_m(dbg_DETAIL,
        "PartName               " << m_partName                 << endl <<
        "m_part.partitionName   " << m_part.partitionName       << endl <<
        "PartUUIDString         " << m_part.partitionUUIDString << endl <<
        "PartUUID               " << m_part.partUUID            << endl <<
        "m_drivesInUse          " << m_drivesInUse              << endl <<
        "m_drivesInUseRecall    " << m_drivesInUseRecall        << endl <<
        "m_drivesInUseMig       " << m_drivesInUseMig           << endl <<
        "m_drivesInUseReorg     " << m_drivesInUseReorg         << endl <<
        "m_drivesInUseRecovery  " << m_drivesInUseRecovery      << endl <<
        "m_drivesInUseMaint     " << m_drivesInUseMaint         << endl <<
        "m_maxDrives            " << m_maxDrives                << endl <<
        "m_maxDrivesRecall      " << m_maxDrivesRecall          << endl <<
        "m_maxDrivesMig         " << m_maxDrivesMig             << endl <<
        "m_maxDrivesReorg       " << m_maxDrivesReorg           << endl <<
        "m_maxDrivesRecovery    " << m_maxDrivesRecovery        << endl <<
        "m_maxDrivesMaint       " << m_maxDrivesMaint           << endl <<
        "m_partitionPriority    " <<  m_partitionPriority       << endl <<
        "m_migrationPriority    " <<  m_migrationPriority       << endl <<
        "m_recallPriority       " <<  m_recallPriority          << endl <<
        "m_reorgPriority        " <<  m_reorgPriority           << endl <<
        "m_recoveryPriority     " <<  m_recoveryPriority        << endl <<
        "m_maintPriority        " <<  m_maintPriority );
}

Here is the caller graph for this function:

void rm_PartitionStatus::Release ( ivd_JobType_e  a_type,
UInt32_t  a_number 
)

Definition at line 291 of file rm_partstate.cpp.

References cmn_Global::dbg, dbg_DETAIL, dbg_LOW, g_cmn, log_Debugger::GetLevel(), ie_NOJOBTYPE, ie_RELEASEERR, ivd_Error, jt_MAINT, jt_MIGRATION, jt_RECALL, jt_RECOVERY, jt_REORG, log_DBG_m, log_FUNC_m, LogCurrentState(), m_drivesInUse, m_drivesInUseMaint, m_drivesInUseMig, m_drivesInUseRecall, and m_drivesInUseRecovery.

                                                                       {
    log_FUNC_m(Release);
    if (g_cmn.dbg.GetLevel() == dbg_DETAIL) {
        LogCurrentState();
    }
        
    if ( m_drivesInUse < a_number ) {
        log_DBG_m(dbg_LOW, " Partition Status:Can not release more drives than allocated" << endl <<
                                                   "m_drivesInUse "  << m_drivesInUse <<
                                                   "a_numberFor Release " << a_number);
        throw ivd_Error(ie_RELEASEERR, " Partition Status:Can not release more drives than allocated", true);
    };
    switch (a_type) {
    case (jt_RECALL):      log_DBG_m(dbg_DETAIL, "Partition Status: Releasing recall resources");
                            if ( m_drivesInUseRecall >= a_number) {
                                m_drivesInUse       -= a_number;
                                m_drivesInUseRecall -= a_number;
                            } else {
                                log_DBG_m(dbg_LOW, " Partition Status:Can not release more drives than allocated" << endl <<
                                                   "m_drivesInUseRecall "  << m_drivesInUseRecall <<
                                                   "a_numberFor Release " << a_number);
                                throw ivd_Error(ie_RELEASEERR, "Partition Status:Can not release more drives than allocated", true);
                            }
                            break;
    case (jt_MIGRATION):   log_DBG_m(dbg_DETAIL, "Partition Status: Releasing migration resources");
                            if ( m_drivesInUseMig >= a_number) {
                                m_drivesInUse       -= a_number;
                                m_drivesInUseMig    -= a_number;

                            } else {
                                log_DBG_m(dbg_LOW, " Partition Status:Can not release more drives than allocated"<< endl <<
                                                        "m_drivesInUseMig "  << m_drivesInUseMig <<
                                                        "a_numberFor Release " << a_number);
                                throw ivd_Error(ie_RELEASEERR, " Partition Status:Can not release more drives than allocated", true);
                            }
                            break;
    /*case (jt_REORG):       log_DBG_m(dbg_DETAIL, "Partition Status:Releasing reorg resources");
                            if ( m_drivesInUseReorg >= a_number) {
                                m_drivesInUse       -= a_number;
                                m_drivesInUseReorg  -= a_number;
                            } else {
                                log_DBG_m(dbg_LOW, " Partition Status:Can not release more drives than allocated"<< endl <<
                                                   "m_drivesInUseReorg "  << m_drivesInUseReorg <<
                                                   "a_numberFor Release " << a_number);
                                throw ivd_Error(ie_RELEASEERR, " Partition Status:Can not release more drives than allocated", true);
                            }
                            break;*/
    case (jt_RECOVERY):    log_DBG_m(dbg_DETAIL, "Partition Status:Releasing recovery resources");
                            if ( m_drivesInUseRecovery >= a_number) {
                                m_drivesInUse       -= a_number;
                                m_drivesInUseRecovery  -= a_number;
                            } else {
                                log_DBG_m(dbg_LOW, " Partition Status:Can not release more drives than allocated"<< endl <<
                                                   "m_drivesInUseRecovery "  << m_drivesInUseRecovery <<
                                                   "a_numberFor Release " << a_number);
                                throw ivd_Error(ie_RELEASEERR, " Partition Status:Can not release more drives than allocated", true);
                            }
                            break;
    case (jt_REORG):
    case (jt_MAINT):    log_DBG_m(dbg_DETAIL, "Partition Status:Releasing maint resources");
                            if ( m_drivesInUseMaint >= a_number) {
                                m_drivesInUse       -= a_number;
                                m_drivesInUseMaint  -= a_number;
                            } else {
                                log_DBG_m(dbg_LOW, " Partition Status:Can not release more drives than allocated"<< endl <<
                                                   "m_drivesInUseMaint "  << m_drivesInUseMaint <<
                                                   "a_numberFor Release " << a_number);
                                throw ivd_Error(ie_RELEASEERR, " Partition Status:Can not release more drives than allocated", true);
                            }
                            break;

    default:                throw ivd_InternalError (ie_NOJOBTYPE, "Partition Status:Can not unreserve drives in SysState w/o job type", true);
    };
}

Here is the call graph for this function:

bool rm_PartitionStatus::Reserve ( ivd_JobType_e  a_type,
UInt32_t  a_number 
)

Definition at line 228 of file rm_partstate.cpp.

References cmn_Global::dbg, dbg_NORM, g_cmn, log_Debugger::GetLevel(), ie_NOJOBTYPE, jt_MAINT, jt_MIGRATION, jt_RECALL, jt_RECOVERY, jt_REORG, log_DBG_m, log_FUNC_m, LogCurrentState(), m_drivesInUse, m_drivesInUseMaint, m_drivesInUseMig, m_drivesInUseRecall, m_drivesInUseRecovery, m_maxDrives, m_maxDrivesMaint, m_maxDrivesMig, m_maxDrivesRecall, and m_maxDrivesRecovery.

                                                                       {
    log_FUNC_m(Reserve);
    if (g_cmn.dbg.GetLevel() == dbg_DETAIL) {
        LogCurrentState();
    }
    if ( (m_drivesInUse + a_number) > m_maxDrives) {
        log_DBG_m(dbg_NORM,"Not enough drives Cfg:"<<
                           m_maxDrives << " InUse:" << m_drivesInUse);
        return false;
    };
    switch (a_type) {
        case (jt_RECALL):      if ( (m_drivesInUseRecall + a_number) <= m_maxDrivesRecall) {
                                    m_drivesInUse       += a_number;
                                    m_drivesInUseRecall += a_number;
                                    return true;
                                } else {
                                    log_DBG_m(dbg_NORM,"Not enough drives for recall Cfg:"<<
                                                        m_maxDrivesRecall << " InUse:" << m_drivesInUseRecall);
                                    return false;
                                };

        case (jt_MIGRATION):   if ( (m_drivesInUseMig + a_number) <= m_maxDrivesMig) {
                                    m_drivesInUse       += a_number;
                                    m_drivesInUseMig    += a_number;
                                    return true;
                                } else {
                                    log_DBG_m(dbg_NORM,"Not enough drives for Mig Cfg:" <<
                                                    m_maxDrivesMig << " InUse:" << m_drivesInUseMig);
                                    return false;
                                };
        /*case (jt_REORG):       if ( (m_drivesInUseReorg + a_number) <= m_maxDrivesReorg) {
                                    m_drivesInUse       += a_number;
                                    m_drivesInUseReorg  += a_number;
                                    return true;
                                } else {
                                    log_DBG_m(dbg_NORM,"Not enough drives for Reorg"<<
                                                    m_maxDrivesReorg << " InUse:" << m_drivesInUseReorg);
                                    return false;
                                };*/
        case (jt_RECOVERY):    if ( (m_drivesInUseRecovery + a_number) <= m_maxDrivesRecovery) {
                                    m_drivesInUse       += a_number;
                                    m_drivesInUseRecovery  += a_number;
                                    return true;
                                } else {
                                    log_DBG_m(dbg_NORM,"Not enough drives for Recovery"<<
                                                    m_maxDrivesRecovery << " InUse:" << m_drivesInUseRecovery);
                                    return false;
                                };
        case (jt_REORG):
        case (jt_MAINT):    if ( (m_drivesInUseMaint + a_number) <= m_maxDrivesMaint) {
                                    m_drivesInUse       += a_number;
                                    m_drivesInUseMaint  += a_number;
                                    return true;
                                } else {
                                    log_DBG_m(dbg_NORM,"Not enough drives for Maint"<<
                                                    m_maxDrivesMaint << " InUse:" << m_drivesInUseMaint);
                                    return false;
                                };
        default:                throw ivd_InternalError (ie_NOJOBTYPE, "Can not reserve drives in SysStae w/o job type", true);
    };

}

Here is the call graph for this function:

void rm_PartitionStatus::Update ( const rm_PartitionStatus a_fromPM  ) 

Definition at line 139 of file rm_partstate.cpp.

References log_FUNC_m, m_maintPriority, m_maxDrives, m_maxDrivesMaint, m_maxDrivesMig, m_maxDrivesRecall, m_maxDrivesRecovery, m_maxDrivesReorg, m_migrationPriority, m_part, m_partitionPriority, m_partName, m_recallPriority, m_recoveryPriority, m_reorgPriority, m_reservedDrives, m_reservedDrivesMaint, m_reservedDrivesMig, m_reservedDrivesRecall, m_reservedDrivesRecovery, and m_reservedDrivesReorg.

                                                                 {
    log_FUNC_m(Update);

    m_partName                  = a_fromPM.m_partName;
    m_part                      = a_fromPM.m_part;
    m_maxDrives                 = a_fromPM.m_maxDrives;
    m_maxDrivesRecall           = a_fromPM.m_maxDrivesRecall;
    m_maxDrivesMig              = a_fromPM.m_maxDrivesMig;
    m_maxDrivesReorg            = a_fromPM.m_maxDrivesReorg;
    m_maxDrivesRecovery         = a_fromPM.m_maxDrivesRecovery;
    m_maxDrivesMaint            = a_fromPM.m_maxDrivesMaint;

    /*m_drivesInUse               = a_fromPM.m_drivesInUse;
    m_drivesInUseRecall         = a_fromPM.m_drivesInUseRecall;
    m_drivesInUseMig            = a_fromPM.m_drivesInUseMig;
    m_drivesInUseReorg          = a_fromPM.m_drivesInUseReorg;
    m_drivesInUseRecovery       = a_fromPM.m_drivesInUseRecovery;
    m_drivesInUseMaint          = a_fromPM.m_drivesInUseMaint;*/

    m_reservedDrives            = a_fromPM.m_reservedDrives;
    m_reservedDrivesRecall      = a_fromPM.m_reservedDrivesRecall;
    m_reservedDrivesMig         = a_fromPM.m_reservedDrivesMig;
    m_reservedDrivesReorg       = a_fromPM.m_reservedDrivesReorg;
    m_reservedDrivesRecovery    = a_fromPM.m_reservedDrivesRecovery;
    m_reservedDrivesMaint       = a_fromPM.m_reservedDrivesMaint;

    m_partitionPriority         = a_fromPM.m_partitionPriority;
    m_migrationPriority         = a_fromPM.m_migrationPriority;
    m_recallPriority            = a_fromPM.m_recallPriority;
    m_reorgPriority             = a_fromPM.m_reorgPriority;
    m_recoveryPriority          = a_fromPM.m_recoveryPriority;
    m_maintPriority             = a_fromPM.m_maintPriority;

}


Friends And Related Function Documentation

friend class rm_SysState [friend]

Definition at line 41 of file rm.h.


Member Data Documentation

Definition at line 175 of file rm.h.

Definition at line 152 of file rm.h.

Referenced by GetDrivesInUse(), Init(), LogCurrentState(), Release(), and Reserve().

Definition at line 157 of file rm.h.

Referenced by GetDrivesInUseMaint(), Init(), LogCurrentState(), Release(), and Reserve().

Definition at line 154 of file rm.h.

Referenced by GetDrivesInUseMig(), Init(), LogCurrentState(), Release(), and Reserve().

Definition at line 153 of file rm.h.

Referenced by GetDrivesInUseRecall(), Init(), LogCurrentState(), Release(), and Reserve().

Definition at line 156 of file rm.h.

Referenced by GetDrivesInUseRecovery(), Init(), LogCurrentState(), Release(), and Reserve().

Definition at line 155 of file rm.h.

Referenced by GetDrivesInUseReorg(), Init(), and LogCurrentState().

Definition at line 173 of file rm.h.

Referenced by rm_SysState::GetNewMigID(), and rm_PartitionStatus().

Definition at line 171 of file rm.h.

Referenced by GetMaintPriority(), Init(), LogCurrentState(), and Update().

Definition at line 145 of file rm.h.

Referenced by GetMaxDrives(), Init(), LogCurrentState(), Reserve(), and Update().

Definition at line 150 of file rm.h.

Referenced by GetMaxDrivesMaint(), Init(), LogCurrentState(), Reserve(), and Update().

Definition at line 147 of file rm.h.

Referenced by GetMaxDrivesMig(), Init(), LogCurrentState(), Reserve(), and Update().

Definition at line 146 of file rm.h.

Referenced by GetMaxDrivesRecall(), Init(), LogCurrentState(), Reserve(), and Update().

Definition at line 149 of file rm.h.

Referenced by GetMaxDrivesRecovery(), Init(), LogCurrentState(), Reserve(), and Update().

Definition at line 148 of file rm.h.

Referenced by GetMaxDrivesReorg(), Init(), LogCurrentState(), and Update().

Definition at line 167 of file rm.h.

Referenced by GetMigrationPriority(), Init(), LogCurrentState(), and Update().

Definition at line 166 of file rm.h.

Referenced by GetPartitionPriority(), Init(), LogCurrentState(), and Update().

Definition at line 142 of file rm.h.

Referenced by GetPartName(), Init(), LogCurrentState(), rm_PartitionStatus(), and Update().

Definition at line 168 of file rm.h.

Referenced by GetRecallPriority(), Init(), LogCurrentState(), and Update().

Definition at line 170 of file rm.h.

Referenced by GetRecoveryPriority(), Init(), LogCurrentState(), and Update().

Definition at line 169 of file rm.h.

Referenced by GetReorgPriority(), Init(), LogCurrentState(), and Update().

Definition at line 159 of file rm.h.

Referenced by GetReservedDrives(), Init(), and Update().

Definition at line 164 of file rm.h.

Referenced by GetReservedDrivesMaint(), Init(), and Update().

Definition at line 161 of file rm.h.

Referenced by GetReservedDrivesMig(), Init(), and Update().

Definition at line 160 of file rm.h.

Referenced by GetReservedDrivesRecall(), Init(), and Update().

Definition at line 163 of file rm.h.

Referenced by GetReservedDrivesRecovery(), Init(), and Update().

Definition at line 162 of file rm.h.

Referenced by GetReservedDrivesReorg(), Init(), and Update().


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