Example #1
0
  @Override
  public void setRejoinComplete(RejoinProducer.ReplayCompletionAction replayComplete) {
    // transition from kStateRejoining to live rejoin replay.
    // pass through this transition in all cases; if not doing
    // live rejoin, will transfer to kStateRunning as usual
    // as the rejoin task log will be empty.
    assert (m_rejoinState == kStateRejoining);

    if (replayComplete == null) {
      throw new RuntimeException("Null Replay Complete Action.");
    }

    m_rejoinState = kStateReplayingRejoin;
    m_replayCompletionAction = replayComplete;
    if (m_rejoinTaskLog != null) {
      m_rejoinTaskLog.setEarliestTxnId(m_replayCompletionAction.getSnapshotTxnId());
    }
  }
Example #2
0
 private void setReplayRejoinComplete() {
   // transition out of rejoin replay to normal running state.
   assert (m_rejoinState == kStateReplayingRejoin);
   m_replayCompletionAction.run();
   m_rejoinState = kStateRunning;
 }