private <T> void executeWithTimeout(
      Consumer<IgniteCache<K, V>> cacheOp, Handler<AsyncResult<T>> handler, long timeout) {
    try {
      IgniteCache<K, V> cache = this.cache.withAsync();
      cacheOp.accept(cache);
      IgniteFuture<T> future = cache.future();

      if (timeout >= 0) {
        vertx.executeBlocking(f -> future.get(timeout), handler);
      } else {
        future.listen(fut -> vertx.executeBlocking(f -> f.complete(future.get()), handler));
      }
    } catch (Exception e) {
      handler.handle(Future.failedFuture(e));
    }
  }