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.


Detailed Description

Definition at line 27 of file fsc_SplitInfoCollector.h.


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
stx_Cache m_cache
 MedVolume file storage.
UInt32_t m_splitCounter

Constructor & Destructor Documentation

fsc_SplitInfoCollector::fsc_SplitInfoCollector ( const cmn_Path a_fscDirectory  ) 

Definition at line 51 of file fsc_SplitInfoCollector.cpp.

References log_FUNC_m.

00052     :
00053     fsc_Collector(),
00054     m_fscDirectory(a_fscDirectory),
00055 //    m_cache(65536) // for fast access to volume Files
00056     m_cache(1024 * 8), // for fast access to volume Files
00057     m_splitCounter(0)
00058 {
00059     log_FUNC_m(fsc_SplitInfoCollector);       
00060 }
//============================================================================//

fsc_SplitInfoCollector::~fsc_SplitInfoCollector (  )  [virtual]

Definition at line 64 of file fsc_SplitInfoCollector.cpp.

References log_FUNC_m.

00064                                                 {
00065     log_FUNC_m(~fsc_SplitInfoCollector);        
00066 }


Member Function Documentation

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 70 of file fsc_SplitInfoCollector.cpp.

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

00070                                                              {
00071     log_FUNC_m(ProcObjDataL);      
00072     m_medVolData.fileID = a_dataL_p->m_fileID;
00073     return true;
00074 }

bool fsc_SplitInfoCollector::ProcObjGeneration ( fsc_Generation a_gen_p  )  [virtual]

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

this method is called by fsc_Split to collect split offset and size

Reimplemented from fsc_Collector.

Definition at line 90 of file fsc_SplitInfoCollector.cpp.

References fsc_medVolData_t::dataType, log_FUNC_m, fsc_Split::m_dataType, m_medVolData, fsc_Split::m_offset, fsc_Split::m_size, fsc_medVolData_t::splitOffset, and fsc_medVolData_t::splitSize.

00090                                                               {
00091     log_FUNC_m(ProcObjSplit);      
00092     m_medVolData.splitOffset = a_split_p->m_offset;
00093     m_medVolData.splitSize   = a_split_p->m_size;
00094     m_medVolData.dataType    = a_split_p->m_dataType;
00095     return true;
00096 }

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 100 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().

00100                                                                          {
00101     log_FUNC_m(ProcObjMedPosMgr);      
00102 
00103     m_splitCounter++;
00104     
00105     m_medVolData.blockOffset = a_medPosMgr_p->m_blockOffset;
00106 
00107     UInt64_t key = fsc_MedVolWriter::KeyGen(a_medPosMgr_p->m_mediaKey, 
00108                                          a_medPosMgr_p->m_medVolNum,
00109                                          a_medPosMgr_p->m_blockOffset);
00110 
00111 
00112     fsc_MedVolWriter *medVol = (fsc_MedVolWriter*)(m_cache.Get(key));
00113     if (medVol == NULL) {
00114         medVol = new fsc_MedVolWriter(m_fscDirectory, 
00115                                        a_medPosMgr_p->m_mediaKey,
00116                                        a_medPosMgr_p->m_medVolNum,
00117                                        a_medPosMgr_p->m_blockOffset);
00118         
00119         m_cache.Insert(medVol);
00120     }
00121    
00122     medVol->Write(&m_medVolData);
00123 
00124     // set to whole size, that other copies of same generation has splitSize set properlly
00125     m_medVolData.splitOffset = 0;
00126     m_medVolData.splitSize   = m_medVolData.dataSize;
00127     m_medVolData.dataType    = m_dataType;
00128     return true;
00129 }

Here is the call graph for this function:

UInt32_t fsc_SplitInfoCollector::GetSplitCounter (  )  [inline]

Definition at line 53 of file fsc_SplitInfoCollector.h.

00053 { return m_splitCounter;};


Member Data Documentation

Reimplemented from fsc_Collector.

Definition at line 53 of file fsc_SplitInfoCollector.h.

to collect each split info

Definition at line 59 of file fsc_SplitInfoCollector.h.

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

where to store files

Definition at line 62 of file fsc_SplitInfoCollector.h.

Referenced by ProcObjMedPosMgr().

each generation set this member

Definition at line 68 of file fsc_SplitInfoCollector.h.

Referenced by ProcObjGeneration(), and ProcObjMedPosMgr().

MedVolume file storage.

Definition at line 71 of file fsc_SplitInfoCollector.h.

Referenced by ProcObjMedPosMgr().

Definition at line 73 of file fsc_SplitInfoCollector.h.

Referenced by ProcObjMedPosMgr().


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

Generated on Mon Feb 27 19:24:43 2012 for OPENARCHIVE by  doxygen 1.5.6