private <T> CompletableFuture<T> doWrite(Func1<T> func) {
    return writeRetryPolicy != null
        ? failsafe(writeRetryPolicy, writeRetryMetrics, retryExecutor).getStageAsync(() -> func.apply())
        : func.apply();
  }
A composable asynchronous retriable table implementation that supports features
defined in {@link TableRetryPolicy}.

@param <K> the type of the key in this table
@param <V> the type of the value in this table
@param <U> the type of the update applied to records in this table
samza-core/src/main/java/org/apache/samza/table/retry/AsyncRetriableTable.java