Public Member Functions | Private Member Functions | Private Attributes

fsc_nsFSrecovery Class Reference

#include <fsc_nsFSrecovery.h>

Inheritance diagram for fsc_nsFSrecovery:
Inheritance graph
Collaboration diagram for fsc_nsFSrecovery:
Collaboration graph

List of all members.

Public Member Functions

 fsc_nsFSrecovery (i_HSM_ptr a_ihsm, ui_MsgWriter &a_msgWriter, UInt32_t a_blkType, UInt32_t a_blkSize, cmn_Path &a_resumeInfoFile, ivd_RecordIDX_t &a_lastFileID)
void NewDiskBuffer (const string &a_id, const string &a_diskBufferFS, const ivd_FileSize_t a_dbFileSize, bool a_append=false)
 ~fsc_nsFSrecovery (void)

Private Member Functions

virtual void GetNewBlock ()
virtual void FlushBlock ()

Private Attributes

i_HSM_var m_ihsm
ofstream m_resumeInfo

Detailed Description

Definition at line 46 of file fsc_nsFSrecovery.h.

Constructor & Destructor Documentation

fsc_nsFSrecovery::fsc_nsFSrecovery ( i_HSM_ptr  a_ihsm,
ui_MsgWriter a_msgWriter,
UInt32_t  a_blkType,
UInt32_t  a_blkSize,
cmn_Path a_resumeInfoFile,
ivd_RecordIDX_t a_lastFileID 

Definition at line 50 of file fsc_nsFSrecovery.cpp.

References ipc_EXEC_m, log_FUNC_m, and m_ihsm.

        df_BlockProxyWriter(a_blkType, a_blkSize),
        m_block(new UInt8_t[a_blkSize]),
        m_ihsm = a_ihsm;
    // empty

fsc_nsFSrecovery::~fsc_nsFSrecovery ( void   ) 

Definition at line 72 of file fsc_nsFSrecovery.cpp.

References dbg_DETAIL, FlushBlock(), df_DataBlock::GetUsedSize(), log_DBG_m, log_FUNC_m, m_block, df_BlockProxyWriter::m_curBlk_p, and NULL.

    log_DBG_m(dbg_DETAIL, "Remove  fsc_nsFSrecovery." );
    if (m_curBlk_p != NULL) {
        if (m_curBlk_p->GetUsedSize()) {
        delete m_curBlk_p;
    delete m_block;

Here is the call graph for this function:

Member Function Documentation

void fsc_nsFSrecovery::FlushBlock (  )  [private, virtual]

Reimplemented from df_BlockProxyWriter.

Definition at line 94 of file fsc_nsFSrecovery.cpp.

References cmn_Num2Str(), dbg_DETAIL, df_DataBlock::Delete(), ui_MsgWriter::DisplayMessage(), df_DataBlock::GetUsedSize(), hton(), ipc_EXEC_m, log_DBG_m, log_FUNC_m, df_BlockProxyWriter::m_blkHdr_p, df_BlockProxyWriter::m_blkSize, m_block, df_BlockProxyWriter::m_curBlk_p, m_ihsm, m_lastFileID, m_msgWriter, m_resumeInfo, and df_BlockHeader_t::used.

Referenced by ~fsc_nsFSrecovery().

    // call HSM to recover files from block
//    int size = m_curBlk_p->GetUsedSize();

    m_blkHdr_p->used = hton(m_curBlk_p->GetUsedSize());

    log_DBG_m(dbg_DETAIL, "Flush block. size " << m_blkSize << ".");
    i_DataBlock_t dataBlock(m_blkSize, m_blkSize, const_cast<CORBA::Octet*>(m_block), 0);

    // current fileID can't went to block, hence up to one before last is recovered
    m_resumeInfo << m_lastFileID << endl;

    m_msgWriter.DisplayMessage("Block flushed up to fileID " + cmn_Num2Str(m_lastFileID) + ".");
    // dump out it for 

Here is the call graph for this function:

Here is the caller graph for this function:

void fsc_nsFSrecovery::GetNewBlock (  )  [private, virtual]
void fsc_nsFSrecovery::NewDiskBuffer ( const string &  a_id,
const string &  a_diskBufferFS,
const ivd_FileSize_t  a_dbFileSize,
bool  a_append = false 
) [inline, virtual]

Implements df_BlockProxyWriter.

Definition at line 56 of file fsc_nsFSrecovery.h.

                                                {} ;

Member Data Documentation

Reimplemented from df_BlockProxyWriter.

Definition at line 63 of file fsc_nsFSrecovery.h.

Definition at line 67 of file fsc_nsFSrecovery.h.

Referenced by FlushBlock(), GetNewBlock(), and ~fsc_nsFSrecovery().

i_HSM_var fsc_nsFSrecovery::m_ihsm [private]

Definition at line 64 of file fsc_nsFSrecovery.h.

Referenced by FlushBlock(), and fsc_nsFSrecovery().

Definition at line 74 of file fsc_nsFSrecovery.h.

Referenced by FlushBlock().

Definition at line 65 of file fsc_nsFSrecovery.h.

Referenced by FlushBlock().

ofstream fsc_nsFSrecovery::m_resumeInfo [private]

Definition at line 70 of file fsc_nsFSrecovery.h.

Referenced by FlushBlock().

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