Examples of RoundRobinSelector


Examples of net.kuujo.vertigo.io.selector.RoundRobinSelector

  private List<IOHook> hooks = new ArrayList<>();
  private Selector selector;

  public DefaultConnectionConfig() {
    super();
    selector = new RoundRobinSelector();
  }
View Full Code Here

Examples of net.kuujo.vertigo.io.selector.RoundRobinSelector

    super();
    selector = new RoundRobinSelector();
  }

  public DefaultConnectionConfig(String source, String target, NetworkConfig network) {
    this(source, DEFAULT_OUT_PORT, target, DEFAULT_IN_PORT, new RoundRobinSelector(), network);
  }
View Full Code Here

Examples of net.kuujo.vertigo.io.selector.RoundRobinSelector

  public DefaultConnectionConfig(String source, String target, Selector selector, NetworkConfig network) {
    this(source, DEFAULT_OUT_PORT, target, DEFAULT_IN_PORT, selector, network);
  }

  public DefaultConnectionConfig(String source, String out, String target, String in, NetworkConfig network) {
    this(source, out, target, in, new RoundRobinSelector(), network);
  }
View Full Code Here

Examples of net.kuujo.vertigo.io.selector.RoundRobinSelector

    this.source.setComponent(source);
    this.source.setPort(out != null ? out : DEFAULT_OUT_PORT);
    this.target.setComponent(target);
    this.target.setPort(in != null ? in : DEFAULT_IN_PORT);
    if (selector == null) {
      selector = new RoundRobinSelector();
    }
    this.selector = selector;
  }
View Full Code Here

Examples of net.kuujo.vertigo.io.selector.RoundRobinSelector

    return customSelect(selector);
  }

  @Override
  public ConnectionConfig roundSelect() {
    this.selector = new RoundRobinSelector();
    return this;
  }
View Full Code Here

Examples of net.kuujo.vertigo.io.selector.RoundRobinSelector

  }

  @Override
  public ConnectionConfig customSelect(Selector selector) {
    if (selector == null) {
      this.selector = new RoundRobinSelector();
    } else if (selector instanceof RoundRobinSelector || selector instanceof RandomSelector || selector instanceof HashSelector
        || selector instanceof FairSelector || selector instanceof AllSelector) {
      this.selector = selector;
    } else {
      this.selector = new CustomSelector(selector);
View Full Code Here

Examples of net.kuujo.vertigo.io.selector.RoundRobinSelector

      public void handle(AsyncResult<Cluster> result) {
        assertTrue(result.succeeded());
        NetworkConfig network = vertigo.createNetwork("test");
        network.addVerticle("sender", TestFeederSender.class.getName());
        network.addVerticle("receiver", TestFeederReceiver.class.getName(), 4);
        network.createConnection("sender", "out", "receiver", "in").setSelector(new RoundRobinSelector());
        Cluster cluster = result.result();
        cluster.deployNetwork(network, new Handler<AsyncResult<ActiveNetwork>>() {
          @Override
          public void handle(AsyncResult<ActiveNetwork> result) {
            if (result.failed()) {
View Full Code Here

Examples of net.kuujo.vertigo.io.selector.RoundRobinSelector

      public void handle(AsyncResult<Cluster> result) {
        assertTrue(result.succeeded());
        NetworkConfig network = vertigo.createNetwork("test");
        network.addVerticle("sender", TestFileSender.class.getName());
        network.addVerticle("receiver", TestFileReceiver.class.getName(), 4);
        network.createConnection("sender", "out", "receiver", "in").setSelector(new RoundRobinSelector());
        Cluster cluster = result.result();
        cluster.deployNetwork(network, new Handler<AsyncResult<ActiveNetwork>>() {
          @Override
          public void handle(AsyncResult<ActiveNetwork> result) {
            if (result.failed()) {
View Full Code Here

Examples of org.rioproject.monitor.service.selectors.RoundRobinSelector

        /* Get the ServiceResourceSelector */
        selector = (ServiceResourceSelector)config.getEntry(CONFIG_COMPONENT,
                                                            "serviceResourceSelector",
                                                            ServiceResourceSelector.class,
                                                            new RoundRobinSelector());
        selector.setLandlordLessor(landlord);
        logger.trace("ServiceResourceSelector : {}", selector.getClass().getName());

        this.eventSource = eventSource;
        this.watch = watch;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.