Interface FDBRecordContext.CommitCheckAsync
-
- All Known Subinterfaces:
FDBRecordContext.CommitCheck
- Enclosing class:
- FDBRecordContext
public static interface FDBRecordContext.CommitCheckAsync
A consistency check, such as uniqueness, that can execute asynchronously and is finally checked at or before commit time.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description CompletableFuture<Void>
checkAsync()
Complete the check.default boolean
isReady()
Get whether the check is ready to be tested.
-
-
-
Method Detail
-
isReady
default boolean isReady()
Get whether the check is ready to be tested.- Returns:
true
if the check is complete
-
checkAsync
@Nonnull CompletableFuture<Void> checkAsync()
Complete the check. This is always called once beforeFDBRecordContext.commit()
finishes. IfisReady()
returnstrue
earlier, it can be called while processing the transaction.- Returns:
- a future that will be complete (exceptionally if the check fails) when the check has been performed
-
-