MCPcopy Create free account
hub / github.com/Tencent/phxpaxos / Instance

Method Instance

src/algorithm/instance.cpp:30–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28{
29
30Instance :: Instance(
31 const Config * poConfig,
32 const LogStorage * poLogStorage,
33 const MsgTransport * poMsgTransport,
34 const Options & oOptions)
35 : m_oSMFac(poConfig->GetMyGroupIdx()),
36 m_oIOLoop((Config *)poConfig, this),
37 m_oAcceptor(poConfig, poMsgTransport, this, poLogStorage),
38 m_oLearner(poConfig, poMsgTransport, this, &m_oAcceptor, poLogStorage, &m_oIOLoop, &m_oCheckpointMgr, &m_oSMFac),
39 m_oProposer(poConfig, poMsgTransport, this, &m_oLearner, &m_oIOLoop),
40 m_oPaxosLog(poLogStorage),
41 m_oCommitCtx((Config *)poConfig),
42 m_oCommitter((Config *)poConfig, &m_oCommitCtx, &m_oIOLoop, &m_oSMFac),
43 m_oCheckpointMgr((Config *)poConfig, &m_oSMFac, (LogStorage *)poLogStorage, oOptions.bUseCheckpointReplayer),
44 m_oOptions(oOptions), m_bStarted(false)
45{
46 m_poConfig = (Config *)poConfig;
47 m_poMsgTransport = (MsgTransport *)poMsgTransport;
48 m_iCommitTimerID = 0;
49 m_iLastChecksum = 0;
50}
51
52Instance :: ~Instance()
53{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected