*/
public class IsolatedLeader extends AbstractLeader {
public IsolatedLeader(RaftActorContext context) {
*/
public class IsolatedLeader extends AbstractLeader {
public IsolatedLeader(RaftActorContext context) {
// it can happen that this isolated leader interacts with a new leader in the cluster and
// changes its state to Follower, hence we only need to switch to Leader if the state is still Isolated
if (ret.state() == RaftState.IsolatedLeader && !isLeaderIsolated()) {
// it can happen that this isolated leader interacts with a new leader in the cluster and
// changes its state to Follower, hence we only need to switch to Leader if the state is still Isolated
if (ret.state() == RaftState.IsolatedLeader && !isLeaderIsolated()) {
- LOG.info("IsolatedLeader {} switching from IsolatedLeader to Leader", leaderId);
- return switchBehavior(new Leader(context));
+ LOG.info("IsolatedLeader {} switching from IsolatedLeader to Leader", getLeaderId());
+ return internalSwitchBehavior(RaftState.Leader);