@Test(timeout = 30000) public void testLeaving() throws IOException, InterruptedException { final int numNodes = 10; final Endpoint seedEndpoint = Utils.hostFromParts("127.0.0.1", basePort); createCluster(1, seedEndpoint); verifyCluster(1); for (int i = 0; i < numNodes; i++) { extendCluster(1, seedEndpoint); waitAndVerifyAgreement(i + 2, 5, 1000); } instances.get(seedEndpoint).leaveGracefully(); instances.remove(seedEndpoint); waitAndVerifyAgreement(numNodes, 2, 1000); }
public void leaveGracefully() { LOG.debug("Leaving the membership group and shutting down"); membershipService.leave(); shutdown(); }
Cluster { public void leaveGracefully() { LOG.debug("Leaving the membership group and shutting down"); membershipService.leave(); shutdown(); } }
Cluster { public void leaveGracefully() { LOG.debug("Leaving the membership group and shutting down"); membershipService.leave(); shutdown(); } private  Cluster(final IMessagingServer rpcServer,
                    final MembershipService membershipService,
                    final SharedResources sharedResources,
                    final Endpoint listenAddress); }
Cluster { public void leaveGracefully() { LOG.debug("Leaving the membership group and shutting down"); membershipService.leave(); shutdown(); } private  Cluster(final IMessagingServer rpcServer,
                    final MembershipService membershipService,
                    final SharedResources sharedResources,
                    final Endpoint listenAddress); List<Endpoint> getMemberlist(); int getMembershipSize(); Map<Endpoint, Metadata> getClusterMetadata(); void registerSubscription(final ClusterEvents event,
                                     final BiConsumer<Long, List<NodeStatusChange>> callback); void leaveGracefully(); void shutdown(); @Override String toString(); }
Cluster { public void leaveGracefully() { LOG.debug("Leaving the membership group and shutting down"); membershipService.leave(); shutdown(); } private  Cluster(final IMessagingServer rpcServer,
                    final MembershipService membershipService,
                    final SharedResources sharedResources,
                    final Endpoint listenAddress); List<Endpoint> getMemberlist(); int getMembershipSize(); Map<Endpoint, Metadata> getClusterMetadata(); void registerSubscription(final ClusterEvents event,
                                     final BiConsumer<Long, List<NodeStatusChange>> callback); void leaveGracefully(); void shutdown(); @Override String toString();  }