Package net.kuujo.vertigo.io.batch.impl

Examples of net.kuujo.vertigo.io.batch.impl.BaseOutputBatch


  @Override
  public OutputPort batch(final String id, final Object args, final Handler<OutputBatch> handler) {
    final List<OutputBatch> batches = new ArrayList<>();
    final int streamsSize = streams.size();
    if (streamsSize == 0) {
      handler.handle(new BaseOutputBatch(id, vertx, batches));
    } else {
      for (OutputStream stream : streams) {
        stream.batch(id, args, new Handler<OutputBatch>() {
          @Override
          public void handle(OutputBatch batch) {
            batches.add(batch);
            if (batches.size() == streamsSize) {
              handler.handle(new BaseOutputBatch(id, vertx, batches));
            }
          }
        });
      }
    }
View Full Code Here

TOP

Related Classes of net.kuujo.vertigo.io.batch.impl.BaseOutputBatch

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.