Interface FDBRecordContext.CommitCheck
-
- All Superinterfaces:
FDBRecordContext.CommitCheckAsync
- Enclosing class:
- FDBRecordContext
public static interface FDBRecordContext.CommitCheck extends FDBRecordContext.CommitCheckAsync
A synchronousFDBRecordContext.CommitCheckAsync
. At some point, this class will be deprecated. Please implementFDBRecordContext.CommitCheckAsync
directly or callFDBRecordContext.addCommitCheck(CompletableFuture)
instead.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
check()
Complete the check.default CompletableFuture<Void>
checkAsync()
Complete the check.-
Methods inherited from interface com.apple.foundationdb.record.provider.foundationdb.FDBRecordContext.CommitCheckAsync
isReady
-
-
-
-
Method Detail
-
checkAsync
@Nonnull default CompletableFuture<Void> checkAsync()
Description copied from interface:FDBRecordContext.CommitCheckAsync
Complete the check. This is always called once beforeFDBRecordContext.commit()
finishes. IfFDBRecordContext.CommitCheckAsync.isReady()
returnstrue
earlier, it can be called while processing the transaction.- Specified by:
checkAsync
in interfaceFDBRecordContext.CommitCheckAsync
- Returns:
- a future that will be complete (exceptionally if the check fails) when the check has been performed
-
check
void check()
Complete the check. This is always called once beforeFDBRecordContext.commit()
finishes. IfFDBRecordContext.CommitCheckAsync.isReady()
returnstrue
earlier, it can be called while processing the transaction.This method should not block or
FDBRecordContext.commitAsync()
will block. It is therefore much better to always implementFDBRecordContext.CommitCheckAsync
or callFDBRecordContext.addCommitCheck(CompletableFuture)
instead.
-
-