sequencer.logicalThread("st", "st:block_first_state_response", "st:kill_node", "st:block_second_state_request",
"st:resume_first_state_response", "st:after_first_state_response", "st:check_incomplete",
"st:resume_second_state_request");
final AtomicReference<Address> firstResponseSender = new AtomicReference<Address>();
CommandMatcher firstStateResponseMatcher = new CommandMatcher() {
CommandMatcher realMatcher = matchCommand(StateResponseCommand.class).matchCount(0).build();
public boolean accept(ReplicableCommand command) {
if (!realMatcher.accept(command))
return false;
firstResponseSender.set(((StateResponseCommand) command).getOrigin());
return true;
}
};
advanceOnInboundRpc(sequencer, manager(0), firstStateResponseMatcher)
.before("st:block_first_state_response", "st:resume_first_state_response")
.after("st:after_first_state_response");
CommandMatcher secondStateRequestMatcher = new CommandMatcher() {
private final AtomicInteger counter = new AtomicInteger();
@Override
public boolean accept(ReplicableCommand command) {
if (command instanceof StateRequestCommand) {