@Test @SuppressWarnings("unchecked") public void activation_not_sent_before_all_distributors_have_acked_state_bundle() { var f = StateActivationFixture.withTwoPhaseEnabled(); var cf = f.cf; f.expectSetSystemStateInvocationsToBothDistributors(); f.simulateBroadcastTick(cf); respondToSetClusterStateBundle(cf.cluster.getNodeInfo(Node.ofDistributor(0)), f.stateBundle, f.d0Waiter.getValue()); f.simulateBroadcastTick(cf); cf.cluster().getNodeInfo().forEach(nodeInfo -> { verify(f.mockCommunicator, times(0)).activateClusterStateVersion(eq(123), eq(nodeInfo), any()); }); assertNull(f.broadcaster.getLastClusterStateBundleConverged()); respondToSetClusterStateBundle(cf.cluster.getNodeInfo(Node.ofDistributor(1)), f.stateBundle, f.d1Waiter.getValue()); f.simulateBroadcastTick(cf); cf.cluster().getNodeInfo().forEach(nodeInfo -> { verify(f.mockCommunicator).activateClusterStateVersion(eq(123), eq(nodeInfo), any()); }); assertNull(f.broadcaster.getLastClusterStateBundleConverged()); }
public ClusterStateBundle getLastClusterStateBundleConverged() { return lastClusterStateBundleConverged; }
SystemStateBroadcaster { public ClusterStateBundle getLastClusterStateBundleConverged() { return lastClusterStateBundleConverged; } }
SystemStateBroadcaster { public ClusterStateBundle getLastClusterStateBundleConverged() { return lastClusterStateBundleConverged; } SystemStateBroadcaster(Timer timer, Object monitor); }
SystemStateBroadcaster { public ClusterStateBundle getLastClusterStateBundleConverged() { return lastClusterStateBundleConverged; } SystemStateBroadcaster(Timer timer, Object monitor); void handleNewClusterStates(ClusterStateBundle state); ClusterState getClusterState(); boolean hasBroadcastedClusterStateBundle(); void resetBroadcastedClusterStateBundle(); ClusterStateBundle getClusterStateBundle(); ClusterStateBundle getLastClusterStateBundleConverged(); boolean processResponses(); boolean broadcastNewStateBundleIfRequired(DatabaseHandler.Context dbContext, Communicator communicator); boolean broadcastStateActivationsIfRequired(DatabaseHandler.Context dbContext, Communicator communicator); int lastClusterStateVersionInSync(); }
SystemStateBroadcaster { public ClusterStateBundle getLastClusterStateBundleConverged() { return lastClusterStateBundleConverged; } SystemStateBroadcaster(Timer timer, Object monitor); void handleNewClusterStates(ClusterStateBundle state); ClusterState getClusterState(); boolean hasBroadcastedClusterStateBundle(); void resetBroadcastedClusterStateBundle(); ClusterStateBundle getClusterStateBundle(); ClusterStateBundle getLastClusterStateBundleConverged(); boolean processResponses(); boolean broadcastNewStateBundleIfRequired(DatabaseHandler.Context dbContext, Communicator communicator); boolean broadcastStateActivationsIfRequired(DatabaseHandler.Context dbContext, Communicator communicator); int lastClusterStateVersionInSync(); static Logger log; }