@Test public void testHandleMessageForUnknownMessage() { logStart("testHandleMessageForUnknownMessage"); leader = new Leader(createActorContext()); assertNull(leader.handleMessage(followerActor, "foo")); }
@Override public RaftActorBehavior handleMessage(final ActorRef sender, final Object originalMessage) { requireNonNull(sender, "sender should not be null"); if (ISOLATED_LEADER_CHECK.equals(originalMessage)) { if (isLeaderIsolated()) { log.warn("{}: At least {} followers need to be active, Switching {} from Leader to IsolatedLeader", context.getId(), getMinIsolatedLeaderPeerCount(), getLeaderId()); return internalSwitchBehavior(new IsolatedLeader(context, this)); } else { return this; } } else { return super.handleMessage(sender, originalMessage); } }
Leader extends AbstractLeader { @Override public RaftActorBehavior handleMessage(final ActorRef sender, final Object originalMessage) { requireNonNull(sender, "sender should not be null"); if (ISOLATED_LEADER_CHECK.equals(originalMessage)) { if (isLeaderIsolated()) { log.warn("{}: At least {} followers need to be active, Switching {} from Leader to IsolatedLeader", context.getId(), getMinIsolatedLeaderPeerCount(), getLeaderId()); return internalSwitchBehavior(new IsolatedLeader(context, this)); } else { return this; } } else { return super.handleMessage(sender, originalMessage); } } }
Leader extends AbstractLeader { @Override public RaftActorBehavior handleMessage(final ActorRef sender, final Object originalMessage) { requireNonNull(sender, "sender should not be null"); if (ISOLATED_LEADER_CHECK.equals(originalMessage)) { if (isLeaderIsolated()) { log.warn("{}: At least {} followers need to be active, Switching {} from Leader to IsolatedLeader", context.getId(), getMinIsolatedLeaderPeerCount(), getLeaderId()); return internalSwitchBehavior(new IsolatedLeader(context, this)); } else { return this; } } else { return super.handleMessage(sender, originalMessage); } } Leader(final RaftActorContext context, @Nullable final AbstractLeader initializeFromLeader);  Leader(final RaftActorContext context); }
Leader extends AbstractLeader { @Override public RaftActorBehavior handleMessage(final ActorRef sender, final Object originalMessage) { requireNonNull(sender, "sender should not be null"); if (ISOLATED_LEADER_CHECK.equals(originalMessage)) { if (isLeaderIsolated()) { log.warn("{}: At least {} followers need to be active, Switching {} from Leader to IsolatedLeader", context.getId(), getMinIsolatedLeaderPeerCount(), getLeaderId()); return internalSwitchBehavior(new IsolatedLeader(context, this)); } else { return this; } } else { return super.handleMessage(sender, originalMessage); } } Leader(final RaftActorContext context, @Nullable final AbstractLeader initializeFromLeader);  Leader(final RaftActorContext context); @Override RaftActorBehavior handleMessage(final ActorRef sender, final Object originalMessage); void transferLeadership(@NonNull final RaftActorLeadershipTransferCohort leadershipTransferCohort); @Override void close(); }
Leader extends AbstractLeader { @Override public RaftActorBehavior handleMessage(final ActorRef sender, final Object originalMessage) { requireNonNull(sender, "sender should not be null"); if (ISOLATED_LEADER_CHECK.equals(originalMessage)) { if (isLeaderIsolated()) { log.warn("{}: At least {} followers need to be active, Switching {} from Leader to IsolatedLeader", context.getId(), getMinIsolatedLeaderPeerCount(), getLeaderId()); return internalSwitchBehavior(new IsolatedLeader(context, this)); } else { return this; } } else { return super.handleMessage(sender, originalMessage); } } Leader(final RaftActorContext context, @Nullable final AbstractLeader initializeFromLeader);  Leader(final RaftActorContext context); @Override RaftActorBehavior handleMessage(final ActorRef sender, final Object originalMessage); void transferLeadership(@NonNull final RaftActorLeadershipTransferCohort leadershipTransferCohort); @Override void close();  }