@Override
  public V get(long timeout, TimeUnit unit) throws InterruptedException, TimeoutException {
    if (Thread.interrupted()) {
      throw new InterruptedException(); // check in case latch is null
    }
    if (isCancelled) {
      throw new CancellationException(
          "Future was cancelled");
    }
    if (latch != null) {
      if (!latch.await(unit.toMillis(timeout))) {
        throw new TimeoutException();
      }
    }
    return value;
  }
Creates a new instance of FutureResult with the value available immediately
geode-core/src/main/java/org/apache/geode/internal/util/concurrent/FutureResult.java