use of org.apache.cassandra.simulator.Action.Modifiers.RELIABLE_NO_TIMEOUTS in project cassandra by apache.
the class OnClusterLeave method performSimple.
public ActionList performSimple() {
IInvokableInstance leaveInstance = actions.cluster.get(leaving);
before(leaveInstance);
AtomicReference<Supplier<? extends Future<?>>> preparedUnbootstrap = new AtomicReference<>();
return ActionList.of(// setup the node's own gossip state for pending ownership, and return gossip actions to disseminate
new OnClusterUpdateGossip(actions, leaving, new OnInstanceSetLeaving(actions, leaving)), new SimulatedActionConsumer<>("Prepare unbootstrap on " + leaving, RELIABLE_NO_TIMEOUTS, RELIABLE_NO_TIMEOUTS, actions, leaveInstance, ref -> ref.set(StorageService.instance.prepareUnbootstrapStreaming()), preparedUnbootstrap), new SimulatedActionConsumer<>("Execute unbootstrap on " + leaving, RELIABLE_NO_TIMEOUTS, RELIABLE_NO_TIMEOUTS, actions, leaveInstance, ref -> FBUtilities.waitOnFuture(ref.get().get()), preparedUnbootstrap), // setup the node's own gossip state for natural ownership, and return gossip actions to disseminate
new OnClusterUpdateGossip(actions, leaving, new OnInstanceSetLeft(actions, leaving)));
}
Aggregations