Example usage for io.vertx.core CompositeFuture size

List of usage examples for io.vertx.core CompositeFuture size

Introduction

In this page you can find the example usage for io.vertx.core CompositeFuture size.

Prototype

int size();

Source Link

Usage

From source file:io.engagingspaces.graphql.servicediscovery.publisher.SchemaRegistrar.java

License:Open Source License

private void handleCloseCompletion(Handler<AsyncResult<Void>> closeHandler, List<Future> futures) {
    CompositeFuture.all(futures).setHandler(rh -> {
        if (rh.succeeded()) {
            CompositeFuture composite = rh.result();
            for (int index = 0; index < composite.size(); index++) {
                if (composite.succeeded(index) && composite.resultAt(index) != null) {
                    composite.<SchemaRegistration>resultAt(index).unregisterServiceProxy();
                }/*from w w w.  jav a  2s  .c  om*/
            }
            doClose(closeHandler);
        } else {
            closeHandler.handle(Future.failedFuture(rh.cause()));
        }
    });
}