#446 Support for CompletableFuture in QuickTxBuilder #476
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
completeAndWaitAsync
methods provide asynchronous completion and monitoring status of the submitted transaction. These methods return aCompletableFuture
that allows handling results or exceptions asynchronously.Submit the transaction and waits asynchronously with a default check interval of 2 seconds and logs the progress using the default logging mechanism.
Submits the transaction and waits asynchronously, logging progress messages using the provided
logConsumer
. Default check interval 2 sec.Submits the transaction and waits asynchronously, using the provided 1logConsumer1 for logging and the specified executor for execution. Default check interval 2 sec.
Submits the transaction and waits asynchronously, checking the transaction status at the specified interval and logging progress messages using the provided logConsumer.
Submits the transaction and waits asynchronously, checking the transaction status at the specified interval. Logs progress messages using the provided logConsumer and executes the process using the specified executor.
Note: For Java 21 and above, virtual thread can be used by providing the custom executor.
Transaction States:
- TxStatus.SUBMITTED: Indicates that the transaction has been submitted.
- TxStatus.CONFIRMED: Indicates that the transaction has been included in a block.
- TxStatus.PENDING: Indicates a pending transaction.