Package net.kuujo.vertigo

Examples of net.kuujo.vertigo.Vertigo


  }

  @Test
  public void testActiveAddComponent() {
    // Deploy a randomly named cluster.
    final Vertigo vertigo = new Vertigo(this);
    vertigo.deployCluster(new Handler<AsyncResult<Cluster>>() {
      @Override
      public void handle(AsyncResult<Cluster> result) {
        assertTrue(result.succeeded());

        // Create a randomly named partial network. This network will have only
        // a single component and a connection that doesn't go anywhere.
        NetworkConfig network = vertigo.createNetwork();
        network.addVerticle("sender", TestActiveSender.class.getName());
        network.createConnection("sender", "out", "receiver", "in");

        // Deploy the partial network. Even though the network has a connection that
        // doesn't actually go anywhere, the "sender" component will still thing the
View Full Code Here


  }

  @Test
  public void testActiveRemoveComponent() {
    // Deploy a randomly named cluster.
    final Vertigo vertigo = new Vertigo(this);
    vertigo.deployCluster(new Handler<AsyncResult<Cluster>>() {
      @Override
      public void handle(AsyncResult<Cluster> result) {
        assertTrue(result.succeeded());

        // Create a randomly named network. This network will be a complete
        // network that we'll later alter once it's deployed.
        NetworkConfig network = vertigo.createNetwork();
        network.addVerticle("sender", TestSimpleSender.class.getName());
        network.addVerticle("receiver", TestSimpleReceiver.class.getName());
        network.createConnection("sender", "out", "receiver", "in");
        result.result().deployNetwork(network, new Handler<AsyncResult<ActiveNetwork>>() {
          @Override
View Full Code Here

  }

  @Test
  public void testActiveCreateConnection() {
    // Deploy a randomly named cluster.
    final Vertigo vertigo = new Vertigo(this);
    vertigo.deployCluster(new Handler<AsyncResult<Cluster>>() {
      @Override
      public void handle(AsyncResult<Cluster> result) {
        assertTrue(result.succeeded());

        // Create a randomly named partial network. This is a network that has
        // two components but no connections.
        NetworkConfig network = vertigo.createNetwork();
        network.addVerticle("sender", TestActiveSender.class.getName());
        network.addVerticle("receiver", TestActiveReceiver.class.getName());

        // When the network is deployed, the components will be deployed as normal,
        // but they won't be able to communicate with each other since there's no
View Full Code Here

  }

  @Test
  public void testActiveDestroyConnection() {
    // Deploy a randomly named cluster.
    final Vertigo vertigo = new Vertigo(this);
    vertigo.deployCluster(new Handler<AsyncResult<Cluster>>() {
      @Override
      public void handle(AsyncResult<Cluster> result) {
        assertTrue(result.succeeded());

        // Create a randomly named complete network.
        NetworkConfig network = vertigo.createNetwork();
        network.addVerticle("sender", TestSimpleSender.class.getName());
        network.addVerticle("receiver", TestSimpleReceiver.class.getName());
        network.createConnection("sender", "out", "receiver", "in");
        result.result().deployNetwork(network, new Handler<AsyncResult<ActiveNetwork>>() {
          @Override
View Full Code Here

    }
  }

  @Test
  public void testOneToNoneBatch() {
    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", TestOneToNoneBatchSender.class.getName());
        network.createConnection("sender", "out", "receiver", "in").roundSelect();
        result.result().deployNetwork(network, new Handler<AsyncResult<ActiveNetwork>>() {
          @Override
          public void handle(AsyncResult<ActiveNetwork> result) {
View Full Code Here

    }
  }

  @Test
  public void testBasicBatch() {
    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", TestBasicBatchSender.class.getName());
        network.addVerticle("receiver", TestBasicBatchReceiver.class.getName());
        network.createConnection("sender", "out", "receiver", "in");
        result.result().deployNetwork(network, new Handler<AsyncResult<ActiveNetwork>>() {
          @Override
View Full Code Here

    }
  }

  @Test
  public void testOneToManyBatch() {
    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", TestOneToManyBatchSender.class.getName());
        network.addVerticle("receiver", TestOneToManyBatchReceiver.class.getName(), 4);
        network.createConnection("sender", "out", "receiver", "in").roundSelect();
        result.result().deployNetwork(network, new Handler<AsyncResult<ActiveNetwork>>() {
          @Override
View Full Code Here

    }
  }

  @Test
  public void testBatches() {
    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", TestBatchesSender.class.getName());
        network.addVerticle("receiver", TestBatchesReceiver.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 testBatchForward() {
    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", TestBatchForwardSender.class.getName());
        network.addVerticle("forwarder", TestBatchForwarder.class.getName());
        network.addVerticle("receiver", TestBatchForwardReceiver.class.getName());
        network.createConnection("sender", "out", "forwarder", "in");
        network.createConnection("forwarder", "out", "receiver", "in");
View Full Code Here

    }
  }

  @Test
  public void testBatchStartArgs() {
    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", TestBatchStartArgsSender.class.getName());
        network.addVerticle("receiver", TestBatchStartArgsReceiver.class.getName());
        network.createConnection("sender", "out", "receiver", "in");
        result.result().deployNetwork(network, new Handler<AsyncResult<ActiveNetwork>>() {
          @Override
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.