handlebars/src/main/java/com/github/jknack/handlebars/cache/HighConcurrencyTemplateCache.java
private Future<Pair<TemplateSource, Template>> putIfAbsent(final TemplateSource source,
      final FutureTask<Pair<TemplateSource, Template>> futureTask) {
    Future<Pair<TemplateSource, Template>> future = cache.putIfAbsent(source, futureTask);
    if (future == null) {
      future = futureTask;
      futureTask.run();
    }
    return future;
  }
/**
   * Compute and put the result of the future task.
   *
   * @param source The template source.
   * @param futureTask The future task.
   * @return The resulting value.
   */
Compute and put the result of the future task.
@param source The template source.
@param futureTask The future task.
@return The resulting value.
Compute and put the result of the future task . @param source The template source . @param futureTask The future task . @return The resulting value .
private Future<Pair<TemplateSource, Template>> putIfAbsent(final TemplateSource source,
      final FutureTask<Pair<TemplateSource, Template>> futureTask) {
    Future<Pair<TemplateSource, Template>> future = cache.putIfAbsent(source, futureTask);
    if (future == null) {
      future = futureTask;
      futureTask.run();
    }
    return future;
  }
private Future < Pair < TemplateSource , Template > > putIfAbsent ( final TemplateSource source , final FutureTask < Pair < TemplateSource , Template > > futureTask ) { Future < Pair < TemplateSource , Template > > future = cache . putIfAbsent ( source , futureTask ) ; if ( future == null ) { future = futureTask ; futureTask . run ( ) ; } return future ; }
Compute and put the result of the future task.
Compute and put the result of the future task .