case "clusterPort": if (member.getValue() instanceof Number) { obj.setClusterPort(((Number)member.getValue()).intValue());
AtomicReference<AsyncResult<Vertx>> result = new AtomicReference<>(); options.setClusterHost(clusterHost).setClusterPort(clusterPort).setClustered(true); if (ha) { String haGroup = args.map.get("-hagroup");
protected void startNodes(int numNodes, VertxOptions options) { CountDownLatch latch = new CountDownLatch(numNodes); vertices = new Vertx[numNodes]; for (int i = 0; i < numNodes; i++) { int index = i; clusteredVertx(options.setClusterHost("localhost").setClusterPort(0).setClustered(true) .setClusterManager(getClusterManager()), ar -> { try { if (ar.failed()) { ar.cause().printStackTrace(); } assertTrue("Failed to start node", ar.succeeded()); vertices[index] = ar.result(); } finally { latch.countDown(); } }); } try { assertTrue(latch.await(2, TimeUnit.MINUTES)); } catch (InterruptedException e) { fail(e.getMessage()); } }
@Override public void beforeStartingVertx(VertxOptions options) { beforeStartingVertxInvoked = true; this.options = options; if (clusterHost != null) { options.setClusterHost(clusterHost); options.setClusterPort(clusterPort); options.setClusterPublicHost(clusterPublicHost); options.setClusterPublicPort(clusterPublicPort); super.beforeStartingVertx(options); } }
.setClusterHost(clusterHost).setClusterPort(clusterPort) .setClusterPublicHost(clusterPublicHost); if (clusterPublicPort != -1) {
case "clusterPort": if (member.getValue() instanceof Number) { obj.setClusterPort(((Number)member.getValue()).intValue());
AtomicReference<AsyncResult<Vertx>> result = new AtomicReference<>(); options.setClusterHost(clusterHost).setClusterPort(clusterPort).setClustered(true); if (ha) { String haGroup = args.map.get("-hagroup");
TimeUnit warningExceptionTimeUnit = TimeUnit.MINUTES; TimeUnit blockedThreadCheckIntervalUnit = TimeUnit.MINUTES; options.setClusterPort(clusterPort); options.setClusterPublicPort(clusterPublicPort); options.setEventLoopPoolSize(eventLoopPoolSize);
protected void startNodes(int numNodes, VertxOptions options) { CountDownLatch latch = new CountDownLatch(numNodes); vertices = new Vertx[numNodes]; for (int i = 0; i < numNodes; i++) { int index = i; clusteredVertx(options.setClusterHost("localhost").setClusterPort(0).setClustered(true) .setClusterManager(getClusterManager()), ar -> { try { if (ar.failed()) { ar.cause().printStackTrace(); } assertTrue("Failed to start node", ar.succeeded()); vertices[index] = ar.result(); } finally { latch.countDown(); } }); } try { assertTrue(latch.await(2, TimeUnit.MINUTES)); } catch (InterruptedException e) { fail(e.getMessage()); } }
@Override public void beforeStartingVertx(VertxOptions options) { beforeStartingVertxInvoked = true; this.options = options; if (clusterHost != null) { options.setClusterHost(clusterHost); options.setClusterPort(clusterPort); options.setClusterPublicHost(clusterPublicHost); options.setClusterPublicPort(clusterPublicPort); super.beforeStartingVertx(options); } }
.setClusterHost(clusterHost).setClusterPort(clusterPort) .setClusterPublicHost(clusterPublicHost); if (clusterPublicPort != -1) {
assertTrue(options.isClustered()); assertEquals(0, options.getClusterPort()); assertEquals(options, options.setClusterPort(1234)); assertEquals(1234, options.getClusterPort()); try { options.setClusterPort(-1); fail("Should throw exception"); } catch (IllegalArgumentException e) { options.setClusterPort(65536); fail("Should throw exception"); } catch (IllegalArgumentException e) {
protected void startNodes(final int numNodes, final VertxOptions options) { final CountDownLatch latch = new CountDownLatch(numNodes); this.vertices = new Vertx[numNodes]; for (int i = 0; i < numNodes; i++) { final int index = i; this.clusteredVertx(options.setClusterHost("localhost").setClusterPort(0).setClustered(true) .setClusterManager(this.getClusterManager()), ar -> { try { if (ar.failed()) { ar.cause().printStackTrace(); } this.assertTrue("Failed to start node", ar.succeeded()); this.vertices[index] = ar.result(); } finally { latch.countDown(); } }); } try { this.assertTrue(latch.await(2, TimeUnit.MINUTES)); } catch (final InterruptedException e) { this.fail(e.getMessage()); } }
protected void startNodes(final int numNodes, final VertxOptions options) { final CountDownLatch latch = new CountDownLatch(numNodes); this.vertices = new Vertx[numNodes]; for (int i = 0; i < numNodes; i++) { final int index = i; this.clusteredVertx(options.setClusterHost("localhost").setClusterPort(0).setClustered(true) .setClusterManager(this.getClusterManager()), ar -> { try { if (ar.failed()) { ar.cause().printStackTrace(); } this.assertTrue("Failed to start node", ar.succeeded()); this.vertices[index] = ar.result(); } finally { latch.countDown(); } }); } try { this.assertTrue(latch.await(2, TimeUnit.MINUTES)); } catch (final InterruptedException e) { this.fail(e.getMessage()); } }
options.setClustered(config.isClustered()); options.setClusterHost(config.getClusterHost()); options.setClusterPort(config.getClusterPort());
protected void startNodes(int numNodes, VertxOptions options) { CountDownLatch latch = new CountDownLatch(numNodes); vertices = new Vertx[numNodes]; for (int i = 0; i < numNodes; i++) { int index = i; clusteredVertx(options.setClusterHost("localhost").setClusterPort(0).setClustered(true) .setClusterManager(getClusterManager()), ar -> { try { if (ar.failed()) { ar.cause().printStackTrace(); } assertTrue("Failed to start node", ar.succeeded()); vertices[index] = ar.result(); } finally { latch.countDown(); } }); } try { Thread.sleep(1500L); } catch (InterruptedException e) { // } try { assertTrue(latch.await(2, TimeUnit.MINUTES)); } catch (InterruptedException e) { fail(e.getMessage()); } }
protected void startNodes(int numNodes, VertxOptions options) { CountDownLatch latch = new CountDownLatch(numNodes); vertices = new Vertx[numNodes]; for (int i = 0; i < numNodes; i++) { int index = i; clusteredVertx(options.setClusterHost("localhost").setClusterPort(0).setClustered(true) .setClusterManager(getClusterManager()), ar -> { try { if (ar.failed()) { ar.cause().printStackTrace(); } assertTrue("Failed to start node", ar.succeeded()); vertices[index] = ar.result(); } finally { latch.countDown(); } }); } try { Thread.sleep(1500L); } catch (InterruptedException e) { // } try { assertTrue(latch.await(2, TimeUnit.MINUTES)); } catch (InterruptedException e) { fail(e.getMessage()); } }
vopt.setClusterPort(clusterPort); } else { logger.warn("clusterPort not set");
TimeUnit warningExceptionTimeUnit = TimeUnit.MINUTES; TimeUnit blockedThreadCheckIntervalUnit = TimeUnit.MINUTES; options.setClusterPort(clusterPort); options.setClusterPublicPort(clusterPublicPort); options.setEventLoopPoolSize(eventLoopPoolSize);
assertTrue(options.isClustered()); assertEquals(0, options.getClusterPort()); assertEquals(options, options.setClusterPort(1234)); assertEquals(1234, options.getClusterPort()); try { options.setClusterPort(-1); fail("Should throw exception"); } catch (IllegalArgumentException e) { options.setClusterPort(65536); fail("Should throw exception"); } catch (IllegalArgumentException e) {