public void Handle(SystemMessage.WriteEpoch message) { if (_vnodeState != VNodeState.Master) { throw new Exception(string.Format("New Epoch request came not in master state!!! State: {0}.", _vnodeState)); } EpochManager.WriteNewEpoch(); }
void IHandle <SystemMessage.WriteEpoch> .Handle(SystemMessage.WriteEpoch message) { if (_vnodeState != VNodeState.Master) { throw new Exception(string.Format("New Epoch request came not in master state!!! State: {0}.", _vnodeState)); } EpochManager.WriteNewEpoch(); PurgeNotProcessedInfo(); }
void IHandle <SystemMessage.WriteEpoch> .Handle(SystemMessage.WriteEpoch message) { if (_vnodeState == VNodeState.PreLeader) { return; } if (_vnodeState != VNodeState.Leader) { throw new Exception(string.Format("New Epoch request not in leader state. State: {0}.", _vnodeState)); } EpochManager.WriteNewEpoch(); PurgeNotProcessedInfo(); }
void IHandle <SystemMessage.WriteEpoch> .Handle(SystemMessage.WriteEpoch message) { //Ensure we write a new epoch when being re-elected master even if there is no state change if (_vnodeState == VNodeState.PreLeader) { return; } if (_vnodeState != VNodeState.Leader) { throw new Exception(string.Format("New Epoch request not in leader state. State: {0}.", _vnodeState)); } EpochManager.WriteNewEpoch(message.EpochNumber); PurgeNotProcessedInfo(); }