@Test public void testOnReceiveAppendEntriesResultNotFound() { NewNodeCatchUpTaskGroup group = new NewNodeCatchUpTaskGroup(); Assert.assertFalse(group.onReceiveAppendEntriesResult( new AppendEntriesResultMessage( new AppendEntriesResult("", 1, true), NodeId.of("A"), new AppendEntriesRpc() ), 10 )); }
public boolean onReceiveAppendEntriesResult(AppendEntriesResultMessage resultMessage, int nextLogIndex) { NewNodeCatchUpTask task = taskMap.get(resultMessage.getSourceNodeId()); if (task == null) { return false; } task.onReceiveAppendEntriesResult(resultMessage, nextLogIndex); return true; }
NewNodeCatchUpTaskGroup { public boolean onReceiveAppendEntriesResult(AppendEntriesResultMessage resultMessage, int nextLogIndex) { NewNodeCatchUpTask task = taskMap.get(resultMessage.getSourceNodeId()); if (task == null) { return false; } task.onReceiveAppendEntriesResult(resultMessage, nextLogIndex); return true; } }
NewNodeCatchUpTaskGroup { public boolean onReceiveAppendEntriesResult(AppendEntriesResultMessage resultMessage, int nextLogIndex) { NewNodeCatchUpTask task = taskMap.get(resultMessage.getSourceNodeId()); if (task == null) { return false; } task.onReceiveAppendEntriesResult(resultMessage, nextLogIndex); return true; }  }
NewNodeCatchUpTaskGroup { public boolean onReceiveAppendEntriesResult(AppendEntriesResultMessage resultMessage, int nextLogIndex) { NewNodeCatchUpTask task = taskMap.get(resultMessage.getSourceNodeId()); if (task == null) { return false; } task.onReceiveAppendEntriesResult(resultMessage, nextLogIndex); return true; }  boolean add(NewNodeCatchUpTask task); boolean onReceiveAppendEntriesResult(AppendEntriesResultMessage resultMessage, int nextLogIndex); boolean onReceiveInstallSnapshotResult(InstallSnapshotResultMessage resultMessage, int nextLogIndex); boolean remove(NewNodeCatchUpTask task); }
NewNodeCatchUpTaskGroup { public boolean onReceiveAppendEntriesResult(AppendEntriesResultMessage resultMessage, int nextLogIndex) { NewNodeCatchUpTask task = taskMap.get(resultMessage.getSourceNodeId()); if (task == null) { return false; } task.onReceiveAppendEntriesResult(resultMessage, nextLogIndex); return true; }  boolean add(NewNodeCatchUpTask task); boolean onReceiveAppendEntriesResult(AppendEntriesResultMessage resultMessage, int nextLogIndex); boolean onReceiveInstallSnapshotResult(InstallSnapshotResultMessage resultMessage, int nextLogIndex); boolean remove(NewNodeCatchUpTask task);  }