private <T> T allOf(Future<T> future, long timeoutMillis, Runnable stopAction) {
        Objects.requireNonNull(future, "future");
        Objects.requireNonNull(stopAction, "stopAction");

        boolean success = false;
        try {
            T t = future.get(timeoutMillis, TimeUnit.MILLISECONDS);
            success = true;
            return t;
        } catch (ExecutionException e) {
            throw new RuntimeException("NodeHistogram create error", e.getCause());
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
            throw new RuntimeException("NodeHistogram interrupt error", e);
        } catch (TimeoutException e) {
            throw new RuntimeException("NodeHistogram timeout error timeout:" + timeoutMillis, e);
        } finally {
            if (!success) {
                stopAction.run();
            }
        }
    }
@author HyunGil Jeong
@author jaehong.kim
web/src/main/java/com/navercorp/pinpoint/web/applicationmap/appender/histogram/DefaultNodeHistogramAppender.java