code: private void updateInstances(List<InstanceContext> instances, final CountingCompletionHandler<Void> counter) {
      for (final InstanceContext instance : instances) {
        data.put(instance.address(), Contexts.serialize(instance).encode(), new Handler<AsyncResult<String>>() {
          @Override
          public void handle(AsyncResult<String> result) {
            if (result.failed()) {
              counter.fail(result.cause());
            } else {
              counter.succeed();
            }
          }
        });
      }
    }
docs: Updates all component instances.