private static CompletableFuture computeValueAsync()

in generators/ReliableStatefulService/templates/class/Service.java [53:61]


    private static CompletableFuture<Long> computeValueAsync(ReliableHashMap<String, Long> map, Transaction tx,
            CancellationToken token) {
        return map.computeAsync(tx, "counter", (k, v) -> {
            if (v == null)
                return 1L;
            else
                return ++v;
        }, Duration.ofSeconds(4), token);
    }