Public Member Functions | Public Attributes | Private Attributes

fsc_SplitInfoCollector Class Reference
[File System Catalog]

#include <fsc_SplitInfoCollector.h>

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

List of all members.

Public Member Functions

 fsc_SplitInfoCollector (const cmn_Path &a_fscDirectory)
virtual ~fsc_SplitInfoCollector ()
virtual bool ProcObjDataL (fsc_DataL *a_dataL_p)
 this method is called by fsc_DataL objekt to collect FileID
virtual bool ProcObjGeneration (fsc_Generation *a_gen_p)
 this method is called by fsc_Generation objekt to collect GenID and Size
virtual bool ProcObjSplit (fsc_Split *a_split_p)
 this method is called by fsc_Split to collect split offset and size
virtual bool ProcObjMedPosMgr (fsc_MedPosMgr *a_medPosMgr_p)
 this method is called by fsc_MedPosMgs to collect media's block offset
UInt32_t GetSplitCounter ()

Public Attributes

 log_CLASSID_m

Private Attributes

fsc_medVolData_t m_medVolData
 to collect each split info
const cmn_Path m_fscDirectory
 where to store files
UInt8_t m_dataType
 each generation set this member
stx_Cache m_cache
 MedVolume file storage.
UInt32_t m_splitCounter

Detailed Description

Definition at line 41 of file fsc_SplitInfoCollector.h.


Constructor & Destructor Documentation

fsc_SplitInfoCollector::fsc_SplitInfoCollector ( const cmn_Path a_fscDirectory  ) 

Definition at line 65 of file fsc_SplitInfoCollector.cpp.

References log_FUNC_m.

    :
    fsc_Collector(),
    m_fscDirectory(a_fscDirectory),
//    m_cache(65536) // for fast access to volume Files
    m_cache(1024 * 8), // for fast access to volume Files
    m_splitCounter(0)
{
    log_FUNC_m(fsc_SplitInfoCollector);       
}

fsc_SplitInfoCollector::~fsc_SplitInfoCollector (  )  [virtual]

Definition at line 78 of file fsc_SplitInfoCollector.cpp.

References log_FUNC_m.


Member Function Documentation

UInt32_t fsc_SplitInfoCollector::GetSplitCounter (  )  [inline]

Definition at line 67 of file fsc_SplitInfoCollector.h.

{ return m_splitCounter;};

bool fsc_SplitInfoCollector::ProcObjDataL ( fsc_DataL a_dataL_p  )  [virtual]

this method is called by fsc_DataL objekt to collect FileID

Reimplemented from fsc_Collector.

Definition at line 84 of file fsc_SplitInfoCollector.cpp.

References fsc_medVolData_t::fileID, log_FUNC_m, fsc_DataL::m_fileID, and m_medVolData.

                                                             {
    log_FUNC_m(ProcObjDataL);      
    m_medVolData.fileID = a_dataL_p->m_fileID;
    return true;
}

bool fsc_SplitInfoCollector::ProcObjGeneration ( fsc_Generation a_gen_p  )  [virtual]
bool fsc_SplitInfoCollector::ProcObjMedPosMgr ( fsc_MedPosMgr a_medPosMgr_p  )  [virtual]

this method is called by fsc_MedPosMgs to collect media's block offset

Reimplemented from fsc_Collector.

Definition at line 114 of file fsc_SplitInfoCollector.cpp.

References fsc_medVolData_t::blockOffset, fsc_medVolData_t::dataSize, fsc_medVolData_t::dataType, stx_Cache::Get(), stx_Cache::Insert(), fsc_MedVolWriter::KeyGen(), log_FUNC_m, fsc_MedPosMgr::m_blockOffset, m_cache, m_dataType, m_fscDirectory, fsc_MedPosMgr::m_mediaKey, m_medVolData, fsc_MedPosMgr::m_medVolNum, m_splitCounter, NULL, fsc_medVolData_t::splitOffset, fsc_medVolData_t::splitSize, and fsc_MedVolWriter::Write().

                                                                         {
    log_FUNC_m(ProcObjMedPosMgr);      

    m_splitCounter++;
    
    m_medVolData.blockOffset = a_medPosMgr_p->m_blockOffset;

    UInt64_t key = fsc_MedVolWriter::KeyGen(a_medPosMgr_p->m_mediaKey, 
                                         a_medPosMgr_p->m_medVolNum,
                                         a_medPosMgr_p->m_blockOffset);


    fsc_MedVolWriter *medVol = (fsc_MedVolWriter*)(m_cache.Get(key));
    if (medVol == NULL) {
        medVol = new fsc_MedVolWriter(m_fscDirectory, 
                                       a_medPosMgr_p->m_mediaKey,
                                       a_medPosMgr_p->m_medVolNum,
                                       a_medPosMgr_p->m_blockOffset);
        
        m_cache.Insert(medVol);
    }
   
    medVol->Write(&m_medVolData);

    // set to whole size, that other copies of same generation has splitSize set properlly
    m_medVolData.splitOffset = 0;
    m_medVolData.splitSize   = m_medVolData.dataSize;
    m_medVolData.dataType    = m_dataType;
    return true;
}

Here is the call graph for this function:

bool fsc_SplitInfoCollector::ProcObjSplit ( fsc_Split a_split_p  )  [virtual]

Member Data Documentation

Reimplemented from fsc_Collector.

Definition at line 67 of file fsc_SplitInfoCollector.h.

MedVolume file storage.

Definition at line 85 of file fsc_SplitInfoCollector.h.

Referenced by ProcObjMedPosMgr().

each generation set this member

Definition at line 82 of file fsc_SplitInfoCollector.h.

Referenced by ProcObjGeneration(), and ProcObjMedPosMgr().

where to store files

Definition at line 76 of file fsc_SplitInfoCollector.h.

Referenced by ProcObjMedPosMgr().

to collect each split info

Definition at line 73 of file fsc_SplitInfoCollector.h.

Referenced by ProcObjDataL(), ProcObjGeneration(), ProcObjMedPosMgr(), and ProcObjSplit().

Definition at line 87 of file fsc_SplitInfoCollector.h.

Referenced by ProcObjMedPosMgr().


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