public Optional<Result> getIfAvailable(long timeout, TimeUnit timeunit) {
        try {
            return Optional.of(super.get(timeout, timeunit));
        }
        catch (InterruptedException e) {
            return Optional.of(new Result(getQuery(), createInterruptedError(e)));
        }
        catch (ExecutionException e) {
            // allow searchers to explicitly signal timeout rather than actually time out (useful for testing)
            if (e.getCause() instanceof com.yahoo.search.federation.TimeoutException)
                return Optional.empty();
            return Optional.of(new Result(getQuery(), createExecutionError(e)));
        }
        catch (TimeoutException e) {
            return Optional.empty();
        }
    }
Same as get(timeout, timeunit) but returns Optional.empty instead of a result with error if the result is 
not available in time
container-search/src/main/java/com/yahoo/search/searchchain/FutureResult.java