Public Member Functions | Public Attributes | Private Attributes

hsm_MigByAPI Class Reference
[Classes for managing object list]

#include <hsm_FHmigc.h>

List of all members.

Public Member Functions

 hsm_MigByAPI ()
 ~hsm_MigByAPI ()
void SetAPIMode (bool a_mode)
bool GetAPIMode ()
void SetColIds (UInt64_t a_majColId, UInt64_t a_minColId, UInt32_t a_flags)
bool IsRunning ()
void StartCall ()
void EndCall ()
void AddJob (UInt64_t a_jobID)
void ClearList ()
vector< UInt64_tGetJobs ()
void InsertInputInode (UInt64_t a_inode)
void InsertJobInode (UInt64_t a_inode, UInt32_t a_jobIdx)
void DumpInputInode ()
void DumpJobInode ()
bool AllFilesInJobs ()
bool WasFileRequested (ivd_GenInode_t a_inode)
void SetMajColList (vector< i_MajorCol_t > &a_majColList)
bool MajColExists (UInt64_t a_majColId)

Public Attributes

UInt64_t m_majColId
UInt64_t m_minColId
UInt32_t m_flags
 log_CLASSID_m

Private Attributes

bool m_running
bool m_apiMode
vector< UInt64_tm_inputFiles
vector< hsm_JobListm_filesInJobIdx
vector< UInt64_tm_jobList
vector< i_MajorCol_tm_majColIdList

Detailed Description

Definition at line 53 of file hsm_FHmigc.h.


Constructor & Destructor Documentation

hsm_MigByAPI::hsm_MigByAPI (  ) 

Definition at line 888 of file hsm_FHmigc.cpp.

References log_FUNC_m.

                          :
    m_running(false),
    m_apiMode(false) {
    log_FUNC_m(hsm_MigByAPI);


}

hsm_MigByAPI::~hsm_MigByAPI (  ) 

Definition at line 921 of file hsm_FHmigc.cpp.

References log_FUNC_m.


Member Function Documentation

void hsm_MigByAPI::AddJob ( UInt64_t  a_jobID  ) 

Definition at line 925 of file hsm_FHmigc.cpp.

References dbg_NORM, g_jobList_x, log_DBG_m, log_FUNC_A_m, and m_jobList.

Referenced by hsm_FHmigc::SendToPM().

                                          {
    log_FUNC_A_m(AddJob, a_jobID);

    cmn_MutexLock l(g_jobList_x);
    m_jobList.push_back(a_jobID);
    log_DBG_m(dbg_NORM, "JobList Size: " << m_jobList.size());
}

Here is the caller graph for this function:

bool hsm_MigByAPI::AllFilesInJobs (  ) 

Definition at line 968 of file hsm_FHmigc.cpp.

References dbg_DETAIL, dbg_LOW, IVD_PRINT_ID_FS, log_DBG_m, log_FUNC_m, m_filesInJobIdx, and m_inputFiles.

Referenced by i_HSM_i::MigrateByAPI().

                                 {
    log_FUNC_m(AllFilesInJobs);

    for (UInt32_t i(0); i < m_inputFiles.size(); i++){
        bool found(false);

        log_DBG_m(dbg_DETAIL, "m_inputFile[" << i << "]:" << IVD_PRINT_ID_FS(m_inputFiles[i]));
        for (UInt32_t j(0); j < m_filesInJobIdx.size(); j++){
/*
            log_DBG_m(dbg_DETAIL, "m_filesInJobIdx[" << j <<
                                "]:" << IVD_PRINT_ID_FS(m_filesInJobIdx[j].inode) <<
                                " in jobidx:" << m_filesInJobIdx[j].jobIdx);
*/
                if (m_inputFiles[i] == m_filesInJobIdx[j].inode) {
                log_DBG_m(dbg_LOW, "Found file in job list: " << IVD_PRINT_ID_FS(m_inputFiles[i]));
                found = true;
                break;
            }
        }
        if (!found) {
            log_DBG_m(dbg_LOW, "File not found in job list: " << IVD_PRINT_ID_FS(m_inputFiles[i]));
            return false;
        }
    }
    log_DBG_m(dbg_LOW, "All files in job list.");
    return true;
}

Here is the caller graph for this function:

void hsm_MigByAPI::ClearList (  ) 

Definition at line 933 of file hsm_FHmigc.cpp.

References g_jobList_x, log_FUNC_m, m_filesInJobIdx, m_inputFiles, and m_jobList.

Referenced by i_HSM_i::MigrateByAPI().

Here is the caller graph for this function:

void hsm_MigByAPI::DumpInputInode (  ) 

Definition at line 952 of file hsm_FHmigc.cpp.

References dbg_DETAIL, IVD_PRINT_ID_FS, log_DBG_m, log_FUNC_m, and m_inputFiles.

Referenced by i_HSM_i::MigrateByAPI().

                                 {
    log_FUNC_m(DumpInputInode);
    for (UInt32_t i(0); i < m_inputFiles.size(); i++){
        log_DBG_m(dbg_DETAIL, "m_inputFile[" << i << "]:" << IVD_PRINT_ID_FS(m_inputFiles[i]));
    }
}

Here is the caller graph for this function:

void hsm_MigByAPI::DumpJobInode (  ) 

Definition at line 959 of file hsm_FHmigc.cpp.

References dbg_DETAIL, IVD_PRINT_ID_FS, log_DBG_m, log_FUNC_m, and m_filesInJobIdx.

Referenced by i_HSM_i::MigrateByAPI().

                               {
    log_FUNC_m(DumpJobInode);
    for (UInt32_t i(0); i < m_filesInJobIdx.size(); i++){
        log_DBG_m(dbg_DETAIL, "m_filesInJobIdx[" << i <<
                              "]:" << IVD_PRINT_ID_FS(m_filesInJobIdx[i].inode) <<
                              " in jobidx:" << m_filesInJobIdx[i].jobIdx);
    }
}

Here is the caller graph for this function:

void hsm_MigByAPI::EndCall (  ) 

Definition at line 917 of file hsm_FHmigc.cpp.

References m_running.

Referenced by i_HSM_i::MigrateByAPI().

                           {
    m_running = false;
}

Here is the caller graph for this function:

bool hsm_MigByAPI::GetAPIMode (  ) 

Definition at line 900 of file hsm_FHmigc.cpp.

References m_apiMode.

Referenced by hsm_FileHeader::Event(), fs_api::EventMounted(), hsm_FHmigc::Migrate(), hsm_FHmigc::Run(), and hsm_FHmigc::SendToPM().

                              {
    return m_apiMode;
}

Here is the caller graph for this function:

vector< UInt64_t > hsm_MigByAPI::GetJobs (  ) 

Definition at line 942 of file hsm_FHmigc.cpp.

References g_jobList_x, and m_jobList.

Referenced by i_HSM_i::MigrateByAPI().

Here is the caller graph for this function:

void hsm_MigByAPI::InsertInputInode ( UInt64_t  a_inode  ) 

Definition at line 948 of file hsm_FHmigc.cpp.

References m_inputFiles.

Referenced by Collocation::TrigMigration().

                                                   {
    m_inputFiles.push_back(a_inode);
}

Here is the caller graph for this function:

void hsm_MigByAPI::InsertJobInode ( UInt64_t  a_inode,
UInt32_t  a_jobIdx 
)

Definition at line 1005 of file hsm_FHmigc.cpp.

References log_FUNC_m, and m_filesInJobIdx.

Referenced by hsm_FHmigc::SendToPM().

                                                                    {
    log_FUNC_m(InsertJobInode);
    m_filesInJobIdx.push_back(hsm_JobList(a_inode, a_jobIdx));
}

Here is the caller graph for this function:

bool hsm_MigByAPI::IsRunning (  ) 

Definition at line 909 of file hsm_FHmigc.cpp.

References m_running.

Referenced by i_HSM_i::MigrateByAPI().

                             {
    return m_running;
}

Here is the caller graph for this function:

bool hsm_MigByAPI::MajColExists ( UInt64_t  a_majColId  ) 

Definition at line 1015 of file hsm_FHmigc.cpp.

References ClientConf_t::CfgPartitionName, ClientConf_t::CfgPartitionUUID, dbg_LOW, g_clientConf_p, log_DBG_m, log_FUNC_m, and m_majColIdList.

Referenced by i_HSM_i::MigrateByAPI().

                                                  {
    log_FUNC_m(MajColExists);
    for(UInt32_t i(0); i < m_majColIdList.size(); i++) {
        log_DBG_m(dbg_LOW, "m_majColIdList.size(): " << m_majColIdList.size());
        if (m_majColIdList[i].majColId == a_majColId) {
            if (g_clientConf_p->CfgPartitionUUID.compare(m_majColIdList[i].partUUID) == 0) {
                log_DBG_m(dbg_LOW, "MajColId found: " << a_majColId);
                return true;
            }
            else {
                log_DBG_m(dbg_LOW, "MajColId " << a_majColId << " found, but it does not belong to the partition "
                    << g_clientConf_p->CfgPartitionName << "(" << g_clientConf_p->CfgPartitionUUID
                    << ", expected " << m_majColIdList[i].partUUID << ").");
                return false;
            }
        };
    }
    log_DBG_m(dbg_LOW, "MajColId not found: " << a_majColId);
    return false;
}

Here is the caller graph for this function:

void hsm_MigByAPI::SetAPIMode ( bool  a_mode  ) 

Definition at line 896 of file hsm_FHmigc.cpp.

References m_apiMode.

Referenced by main(), and i_HSM_i::Reconfigure().

                                         {
    m_apiMode = a_mode;
}

Here is the caller graph for this function:

void hsm_MigByAPI::SetColIds ( UInt64_t  a_majColId,
UInt64_t  a_minColId,
UInt32_t  a_flags 
)

Definition at line 903 of file hsm_FHmigc.cpp.

References m_flags, m_majColId, and m_minColId.

Referenced by i_HSM_i::MigrateByAPI().

                                                                                      {
    m_majColId = a_majColId;
    m_minColId = a_minColId;
    m_flags = a_flags;
}

Here is the caller graph for this function:

void hsm_MigByAPI::SetMajColList ( vector< i_MajorCol_t > &  a_majColList  ) 

Definition at line 1010 of file hsm_FHmigc.cpp.

References log_FUNC_m, and m_majColIdList.

Referenced by i_HSM_i::MigrateByAPI().

                                                                   {
    log_FUNC_m(SetMajColList);
    m_majColIdList = a_majColList;
}

Here is the caller graph for this function:

void hsm_MigByAPI::StartCall (  ) 

Definition at line 913 of file hsm_FHmigc.cpp.

References m_running.

Referenced by i_HSM_i::MigrateByAPI().

                             {
    m_running = true;
}

Here is the caller graph for this function:

bool hsm_MigByAPI::WasFileRequested ( ivd_GenInode_t  a_inode  ) 

Definition at line 996 of file hsm_FHmigc.cpp.

References m_inputFiles.

Referenced by hsm_FHmigc::Migrate().

                                                          {
    for (UInt32_t i(0); i < m_inputFiles.size(); i++) {
        if (m_inputFiles[i] == a_inode) {
            return true;
        }
    }
    return false;
}

Here is the caller graph for this function:


Member Data Documentation

Definition at line 102 of file hsm_FHmigc.h.

bool hsm_MigByAPI::m_apiMode [private]

Definition at line 88 of file hsm_FHmigc.h.

Referenced by GetAPIMode(), and SetAPIMode().

Definition at line 91 of file hsm_FHmigc.h.

Referenced by AllFilesInJobs(), ClearList(), DumpJobInode(), and InsertJobInode().

Definition at line 99 of file hsm_FHmigc.h.

Referenced by hsm_FHmigc::SendToPM(), and SetColIds().

vector<UInt64_t> hsm_MigByAPI::m_jobList [private]

Definition at line 93 of file hsm_FHmigc.h.

Referenced by AddJob(), ClearList(), and GetJobs().

Definition at line 97 of file hsm_FHmigc.h.

Referenced by i_HSM_i::MigrateByAPI(), hsm_FHmigc::SendToPM(), and SetColIds().

Definition at line 94 of file hsm_FHmigc.h.

Referenced by MajColExists(), and SetMajColList().

Definition at line 98 of file hsm_FHmigc.h.

Referenced by i_HSM_i::MigrateByAPI(), hsm_FHmigc::SendToPM(), and SetColIds().

bool hsm_MigByAPI::m_running [private]

Definition at line 87 of file hsm_FHmigc.h.

Referenced by EndCall(), IsRunning(), and StartCall().


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