Package net.kuujo.vertigo

Examples of net.kuujo.vertigo.Vertigo


    }
  }

  @Test
  public void testMany() {
    final Vertigo vertigo = new Vertigo(this);
    vertigo.deployCluster(new Handler<AsyncResult<Cluster>>() {
      @Override
      public void handle(AsyncResult<Cluster> result) {
        assertTrue(result.succeeded());
        NetworkConfig network = vertigo.createNetwork();
        network.addVerticle("sender", TestManySender.class.getName());
        network.addVerticle("receiver", TestManyReceiver.class.getName());
        network.createConnection("sender", "out", "receiver", "in").roundSelect();
        result.result().deployNetwork(network, new Handler<AsyncResult<ActiveNetwork>>() {
          @Override
View Full Code Here


    }
  }

  @Test
  public void testPauseResume() {
    final Vertigo vertigo = new Vertigo(this);
    vertigo.deployCluster(new Handler<AsyncResult<Cluster>>() {
      @Override
      public void handle(AsyncResult<Cluster> result) {
        assertTrue(result.succeeded());
        NetworkConfig network = vertigo.createNetwork();
        network.addVerticle("sender", TestPauseResumeSender.class.getName());
        network.addVerticle("receiver", TestPauseResumeReceiver.class.getName());
        network.createConnection("sender", "out", "receiver", "in").roundSelect();
        result.result().deployNetwork(network, new Handler<AsyncResult<ActiveNetwork>>() {
          @Override
View Full Code Here

    }
  }

  @Test
  public void testNestedGroupForward() {
    final Vertigo vertigo = new Vertigo(this);
    vertigo.deployCluster(new Handler<AsyncResult<Cluster>>() {
      @Override
      public void handle(AsyncResult<Cluster> result) {
        assertTrue(result.succeeded());
        NetworkConfig network = vertigo.createNetwork();
        network.addVerticle("sender", TestNestedGroupForwardSender.class.getName());
        network.addVerticle("forwarder", TestNestedGroupForwardForwarder.class.getName());
        network.addVerticle("receiver", TestNestedGroupForwardReceiver.class.getName());
        network.createConnection("sender", "out", "forwarder", "in").roundSelect();
        network.createConnection("forwarder", "out", "receiver", "in").roundSelect();
View Full Code Here

    }
  }

  @Test
  public void testGroupStartArgs() {
    final Vertigo vertigo = new Vertigo(this);
    vertigo.deployCluster(new Handler<AsyncResult<Cluster>>() {
      @Override
      public void handle(AsyncResult<Cluster> result) {
        assertTrue(result.succeeded());
        NetworkConfig network = vertigo.createNetwork();
        network.addVerticle("sender", TestGroupStartArgsSender.class.getName());
        network.addVerticle("receiver", TestGroupStartArgsReceiver.class.getName());
        network.createConnection("sender", "out", "receiver", "in");
        result.result().deployNetwork(network, new Handler<AsyncResult<ActiveNetwork>>() {
          @Override
View Full Code Here

    }
  }

  @Test
  public void testGroupEndArgs() {
    final Vertigo vertigo = new Vertigo(this);
    vertigo.deployCluster(new Handler<AsyncResult<Cluster>>() {
      @Override
      public void handle(AsyncResult<Cluster> result) {
        assertTrue(result.succeeded());
        NetworkConfig network = vertigo.createNetwork();
        network.addVerticle("sender", TestGroupEndArgsSender.class.getName());
        network.addVerticle("receiver", TestGroupEndArgsReceiver.class.getName());
        network.createConnection("sender", "out", "receiver", "in");
        result.result().deployNetwork(network, new Handler<AsyncResult<ActiveNetwork>>() {
          @Override
View Full Code Here

*/
public class CoordinatorTest extends TestVerticle {

  @Test
  public void testStartWithExistingContext() {
    final Vertigo vertigo = new Vertigo(this);
    vertigo.deployCluster("vertigo", new Handler<AsyncResult<Cluster>>() {
      @Override
      public void handle(AsyncResult<Cluster> result) {
        assertTrue(result.succeeded());
        final NetworkContext context = DefaultNetworkContext.Builder.newBuilder()
            .setName("test-coordinator-start")
View Full Code Here

    });
  }

  @Test
  public void testPauseHandler() {
    final Vertigo vertigo = new Vertigo(this);
    vertigo.deployCluster("vertigo", new Handler<AsyncResult<Cluster>>() {
      @Override
      public void handle(AsyncResult<Cluster> result) {
        assertTrue(result.succeeded());
        final NetworkContext context = DefaultNetworkContext.Builder.newBuilder()
            .setName("test-coordinator-pause")
View Full Code Here

    });
  }

  @Test
  public void testResumeHandler() {
    final Vertigo vertigo = new Vertigo(this);
    vertigo.deployCluster("vertigo", new Handler<AsyncResult<Cluster>>() {
      @Override
      public void handle(AsyncResult<Cluster> result) {
        assertTrue(result.succeeded());
        final NetworkContext context = DefaultNetworkContext.Builder.newBuilder()
            .setName("test-coordinator-resume")
View Full Code Here

*/
public class AsyncQueueTest extends TestVerticle {

  @Test
  public void testQueueAdd() {
    Vertigo vertigo = new Vertigo(this);
    vertigo.deployCluster("test", new Handler<AsyncResult<Cluster>>() {
      @Override
      public void handle(AsyncResult<Cluster> result) {
        assertTrue(result.succeeded());
        final Cluster cluster = new DefaultCluster("test", vertx, container);
        final AsyncQueue<String> data = cluster.getQueue("test-queue-add");
View Full Code Here

    });
  }

  @Test
  public void testQueuePoll() {
    Vertigo vertigo = new Vertigo(this);
    vertigo.deployCluster("test", new Handler<AsyncResult<Cluster>>() {
      @Override
      public void handle(AsyncResult<Cluster> result) {
        assertTrue(result.succeeded());
        final Cluster cluster = new DefaultCluster("test", vertx, container);
        final AsyncQueue<String> data = cluster.getQueue("test-queue-get");
View Full Code Here

TOP

Related Classes of net.kuujo.vertigo.Vertigo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.