クラス Onikiri::CheckpointMaster

#include <CheckpointMaster.h>

Onikiri::CheckpointMasterに対する継承グラフ

Inheritance graph
[凡例]
Onikiri::CheckpointMasterのコラボレーション図

Collaboration graph
[凡例]
すべてのメンバ一覧

Public 型

typedef CheckpointedDataListType::iterator CheckpoinedtDataListIterator
typedef pool_vector< CheckpointedDataBase * > CheckpointedDataListType
typedef CheckpointListType::iterator CheckpointListIterator
typedef pool_list< Checkpoint * > CheckpointListType
enum  Slot { SLOT_FETCH = 0, SLOT_RENAME, SLOT_MAX }
 SLOT_FETCH = 0
 SLOT_MAX
 SLOT_RENAME

Public メソッド

void Backup (Checkpoint *checkpoint, Slot slot)
 BEGIN_PARAM_MAP (GetParamPath()) CheckpointMaster()
bool CanCreate (int num) const
void Commit (Checkpoint *checkpoint)
CheckpointCreateCheckpoint ()
void Flush (Checkpoint *checkpoint)
void Initialize (InitPhase phase)
void Recover (Checkpoint *checkpoint)
CheckpointedDataHandle Register (CheckpointedDataBase *data, Slot slot)
virtual ~CheckpointMaster ()

Protected メソッド

CheckpointConstructCheckpoint (size_t refSize)
void DestroyCheckpoint (Checkpoint *cp)

Protected 変数

size_t m_capacity
CheckpointListType m_checkpoint
boost::object_pool< Checkpointm_checkpointPool
CheckpointedDataListType m_data
std::vector< CheckpointedDataListTypem_dataTable

説明

CheckpointMaster.h45 行で定義されています。


型定義

typedef CheckpointedDataListType::iterator Onikiri::CheckpointMaster::CheckpoinedtDataListIterator

CheckpointMaster.h52 行で定義されています。

typedef pool_vector< CheckpointedDataBase* > Onikiri::CheckpointMaster::CheckpointedDataListType

CheckpointMaster.h51 行で定義されています。

typedef CheckpointListType::iterator Onikiri::CheckpointMaster::CheckpointListIterator

CheckpointMaster.h49 行で定義されています。

typedef pool_list< Checkpoint* > Onikiri::CheckpointMaster::CheckpointListType

CheckpointMaster.h48 行で定義されています。


列挙型

enum Onikiri::CheckpointMaster::Slot

列挙型の値:
SLOT_FETCH 
SLOT_RENAME 
SLOT_MAX 

CheckpointMaster.h54 行で定義されています。

00055         {
00056             SLOT_FETCH = 0,
00057             SLOT_RENAME,
00058             SLOT_MAX
00059         };


コンストラクタとデストラクタ

CheckpointMaster::~CheckpointMaster (  )  [virtual]

CheckpointMaster.cpp50 行で定義されています。

参照先 DestroyCheckpoint()m_checkpointOnikiri::PhysicalResourceNode::ReleaseParam().

00051 {
00052     // Release all checkpoints and related data.
00053     for( CheckpointListIterator i = m_checkpoint.begin(); i != m_checkpoint.end(); ++i ){
00054         DestroyCheckpoint( *i );
00055     }
00056     m_checkpoint.clear();
00057 
00058     ReleaseParam();
00059 }

関数の呼び出しグラフ:


関数

void CheckpointMaster::Backup ( Checkpoint checkpoint,
Slot  slot 
)

CheckpointMaster.cpp97 行で定義されています。

参照先 ASSERTm_dataTable.

参照元 Onikiri::Fetcher::BackupOnCheckpoint().

00098 {
00099     ASSERT( checkpoint != NULL );
00100     CheckpointedDataListType* copyTo = &m_dataTable[ slot ];
00101     for( CheckpointedDataListType::iterator i = copyTo->begin(); i != copyTo->end(); ++i ){
00102         (*i)->Backup( checkpoint ); 
00103     }
00104 }

Here is the caller graph for this function:

Onikiri::CheckpointMaster::BEGIN_PARAM_MAP ( GetParamPath()   ) 

bool Onikiri::CheckpointMaster::CanCreate ( int  num  )  const [inline]

CheckpointMaster.h95 行で定義されています。

参照先 m_capacitym_checkpoint.

参照元 Onikiri::Fetcher::CanFetch().

00096         {
00097             return m_capacity >= m_checkpoint.size() + num; 
00098         }

Here is the caller graph for this function:

void CheckpointMaster::Commit ( Checkpoint checkpoint  ) 

CheckpointMaster.cpp108 行で定義されています。

参照先 ASSERTDestroyCheckpoint()m_checkpoint.

参照元 Onikiri::InorderList::NotifyCommit().

00109 {
00110     ASSERT( 
00111         m_checkpoint.size() > 0 && m_checkpoint.front() == checkpoint,
00112         "A checkpoint that is not at the front is committed. Checkpoints must be flushed in-order."
00113     );
00114     DestroyCheckpoint( checkpoint );
00115     m_checkpoint.pop_front();
00116 }

関数の呼び出しグラフ:

Here is the caller graph for this function:

Checkpoint * CheckpointMaster::ConstructCheckpoint ( size_t  refSize  )  [protected]

CheckpointMaster.cpp138 行で定義されています。

参照先 ASSERTm_checkpointPoolm_data.

参照元 CreateCheckpoint().

00139 {
00140     Checkpoint* ptr = m_checkpointPool.construct( m_data.size() );
00141     ASSERT( ptr != NULL, "Memory allocation failed." );
00142     return ptr;
00143 }

Here is the caller graph for this function:

Checkpoint * CheckpointMaster::CreateCheckpoint (  ) 

CheckpointMaster.cpp83 行で定義されています。

参照先 ASSERTConstructCheckpoint()m_capacitym_checkpointm_data.

参照元 Onikiri::Fetcher::CreateCheckpoint().

00084 {
00085     ASSERT( m_capacity > m_checkpoint.size(), "cannot create checkpoint." );
00086 
00087     Checkpoint* cp = ConstructCheckpoint( m_data.size() );
00088     m_checkpoint.push_back( cp );
00089 
00090     for( CheckpointedDataListType::iterator i = m_data.begin(); i != m_data.end(); ++i ){
00091         (*i)->Allocate( cp );
00092     }
00093     return cp;
00094 }

関数の呼び出しグラフ:

Here is the caller graph for this function:

void CheckpointMaster::DestroyCheckpoint ( Checkpoint cp  )  [protected]

CheckpointMaster.cpp145 行で定義されています。

参照先 m_checkpointPoolm_data.

参照元 Commit()Flush()~CheckpointMaster().

00146 {
00147     // Erase data referred from checkpoint.
00148     for( CheckpointedDataListType::iterator i = m_data.begin(); i != m_data.end(); ++i ){
00149         (*i)->Erase( checkpoint ); 
00150     }
00151 
00152     m_checkpointPool.destroy( checkpoint );
00153 }

Here is the caller graph for this function:

void CheckpointMaster::Flush ( Checkpoint checkpoint  ) 

CheckpointMaster.cpp119 行で定義されています。

参照先 ASSERTDestroyCheckpoint()m_checkpoint.

参照元 Onikiri::InorderList::NotifyFlush().

00120 {
00121     ASSERT(
00122         m_checkpoint.size() > 0 && m_checkpoint.back() == checkpoint,
00123         "A checkpoint that is not at the back is flushed. Checkpoints must be flushed from the back."
00124     );
00125     DestroyCheckpoint( checkpoint );
00126     m_checkpoint.pop_back();
00127 }

関数の呼び出しグラフ:

Here is the caller graph for this function:

void CheckpointMaster::Initialize ( InitPhase  phase  ) 

CheckpointMaster.cpp61 行で定義されています。

参照先 Onikiri::PhysicalResourceNode::INIT_PRE_CONNECTIONOnikiri::ParamExchange::LoadParam()m_dataTableSLOT_MAX.

00062 {
00063     if( phase == INIT_PRE_CONNECTION ){
00064         LoadParam();
00065         m_dataTable.resize( SLOT_MAX );
00066     }
00067     
00068 }

関数の呼び出しグラフ:

void CheckpointMaster::Recover ( Checkpoint checkpoint  ) 

CheckpointMaster.cpp130 行で定義されています。

参照先 m_data.

参照元 Onikiri::Recoverer::RecoverCheckpoint().

00131 {
00132     for( CheckpointedDataListType::iterator i = m_data.begin(); i != m_data.end(); ++i ){
00133         (*i)->Recover( checkpoint );
00134     }
00135 }

Here is the caller graph for this function:

CheckpointedDataHandle CheckpointMaster::Register ( CheckpointedDataBase data,
Slot  slot 
)

CheckpointMaster.cpp72 行で定義されています。

参照先 m_datam_dataTable.

参照元 Onikiri::CheckpointedData< uint64_t >::Initialize().

00075  {
00076     m_data.push_back( data );
00077     m_dataTable[ slot ].push_back( data );
00078     return m_data.size() - 1;
00079 }

Here is the caller graph for this function:


変数

size_t Onikiri::CheckpointMaster::m_capacity [protected]

CheckpointMaster.h101 行で定義されています。

参照元 CanCreate()CreateCheckpoint().

CheckpointListType Onikiri::CheckpointMaster::m_checkpoint [protected]

CheckpointMaster.h106 行で定義されています。

参照元 CanCreate()Commit()CreateCheckpoint()Flush()~CheckpointMaster().

boost::object_pool<Checkpoint> Onikiri::CheckpointMaster::m_checkpointPool [protected]

CheckpointMaster.h109 行で定義されています。

参照元 ConstructCheckpoint()DestroyCheckpoint().

CheckpointedDataListType Onikiri::CheckpointMaster::m_data [protected]

CheckpointMaster.h103 行で定義されています。

参照元 ConstructCheckpoint()CreateCheckpoint()DestroyCheckpoint()Recover()Register().

std::vector<CheckpointedDataListType> Onikiri::CheckpointMaster::m_dataTable [protected]

CheckpointMaster.h104 行で定義されています。

参照元 Backup()Initialize()Register().


このクラスの説明は次のファイルから生成されました:
Onikiri2に対してTue Jun 18 14:54:23 2013に生成されました。  doxygen 1.4.7