congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
HATest.clusteredVertx
Code IndexAdd Tabnine to your IDE (free)

How to use
clusteredVertx
method
in
io.vertx.core.HATest

Best Java code snippets using io.vertx.core.HATest.clusteredVertx (Showing top 3 results out of 315)

origin: eclipse-vertx/vert.x

protected Vertx startVertx(String haGroup, int quorumSize, boolean ha) throws Exception {
 VertxOptions options = new VertxOptions().setHAEnabled(ha).setClustered(true).
  setClusterHost("localhost").setClusterManager(getClusterManager());
 if (ha) {
  options.setQuorumSize(quorumSize);
  if (haGroup != null) {
   options.setHAGroup(haGroup);
  }
 }
 CountDownLatch latch = new CountDownLatch(1);
 AtomicReference<Vertx> vertxRef = new AtomicReference<>();
 clusteredVertx(options, onSuccess(vertx -> {
  vertxRef.set(vertx);
  latch.countDown();
 }));
 latch.await(2, TimeUnit.MINUTES);
 return vertxRef.get();
}
origin: io.vertx/vertx-core

protected Vertx startVertx(String haGroup, int quorumSize, boolean ha) throws Exception {
 VertxOptions options = new VertxOptions().setHAEnabled(ha).setClustered(true).
  setClusterHost("localhost").setClusterManager(getClusterManager());
 if (ha) {
  options.setQuorumSize(quorumSize);
  if (haGroup != null) {
   options.setHAGroup(haGroup);
  }
 }
 CountDownLatch latch = new CountDownLatch(1);
 AtomicReference<Vertx> vertxRef = new AtomicReference<>();
 clusteredVertx(options, onSuccess(vertx -> {
  vertxRef.set(vertx);
  latch.countDown();
 }));
 latch.await(2, TimeUnit.MINUTES);
 return vertxRef.get();
}
origin: io.vertx/vertx-infinispan

@Override
protected void clusteredVertx(VertxOptions options, Handler<AsyncResult<Vertx>> ar) {
 CountDownLatch latch = new CountDownLatch(1);
 Future<Vertx> future = Future.future();
 future.setHandler(ar);
 super.clusteredVertx(options, asyncResult -> {
  if (asyncResult.succeeded()) {
   future.complete(asyncResult.result());
  } else {
   future.fail(asyncResult.cause());
  }
  latch.countDown();
 });
 try {
  assertTrue(latch.await(2, TimeUnit.MINUTES));
 } catch (InterruptedException e) {
  fail(e.getMessage());
 }
}
io.vertx.coreHATestclusteredVertx

Popular methods of HATest

  • setUp
  • after
  • assertEquals
  • assertFalse
  • assertTrue
  • assertWaitUntil
  • await
  • awaitLatch
  • checkDeploymentExists
  • closeVertices
  • fail
  • getClusterManager
  • fail,
  • getClusterManager,
  • kill,
  • onSuccess,
  • startNodes,
  • startVertx,
  • tearDown,
  • testComplete

Popular in Java

  • Reading from database using SQL prepared statement
  • getResourceAsStream (ClassLoader)
  • findViewById (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • JPanel (javax.swing)
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now