stream/api/src/main/java/org/apache/bookkeeper/api/kv/TableWriteView.java [138:163]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    default CompletableFuture<Long> vPut(K pKey, K lKey, V value, long expectedVersion) {
        Txn<K, V> txn = txn(pKey);
        txn
            .If(
                opFactory().compareVersion(CompareResult.EQUAL, lKey, expectedVersion))
            .Then(
                opFactory().newPut(
                    lKey,
                    value,
                    opFactory().optionFactory().newPutOption().build()));
        return txn.commit()
            .thenCompose(result -> {
                try {
                    if (result.isSuccess()) {
                        return FutureUtils.value(expectedVersion + 1);
                    } else {
                        return FutureUtils.exception(
                            new KvApiException(
                                Code.BAD_REVISION,
                                "Failed to vPut(" + lKey + ", " + value + ")@version=" + expectedVersion));
                    }
                } finally {
                    result.close();
                }
            });
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



stream/api/src/main/java/org/apache/bookkeeper/api/kv/PTableWriteView.java [134:159]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    default CompletableFuture<Long> vPut(K pKey, K lKey, V value, long expectedVersion) {
        Txn<K, V> txn = txn(pKey);
        txn
            .If(
                opFactory().compareVersion(CompareResult.EQUAL, lKey, expectedVersion))
            .Then(
                opFactory().newPut(
                    lKey,
                    value,
                    opFactory().optionFactory().newPutOption().build()));
        return txn.commit()
            .thenCompose(result -> {
                try {
                    if (result.isSuccess()) {
                        return FutureUtils.value(expectedVersion + 1);
                    } else {
                        return FutureUtils.exception(
                            new KvApiException(
                                Code.BAD_REVISION,
                                "Failed to vPut(" + lKey + ", " + value + ")@version=" + expectedVersion));
                    }
                } finally {
                    result.close();
                }
            });
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



