- Type Parameters:
V- the type of the value computed by the transaction
- All Known Subinterfaces:
ConstructorFuture,MethodFuture
public interface CodeFuture<V>
The future of a transaction that executes code in a node.
-
Method Summary
Modifier and TypeMethodDescriptionget()Waits if necessary for the transaction to complete, and then retrieves its result.Yields the reference of the request of the transaction.
-
Method Details
-
getReferenceOfRequest
TransactionReference getReferenceOfRequest()Yields the reference of the request of the transaction.- Returns:
- the reference
-
get
V get() throws TransactionRejectedException, TransactionException, CodeExecutionException, ClosedNodeException, TimeoutException, InterruptedExceptionWaits if necessary for the transaction to complete, and then retrieves its result.- Returns:
- the computed result of the transaction
- Throws:
TransactionRejectedException- if the transaction could not be executed and the store of the node remained unchangedCodeExecutionException- if the transaction could be executed but led to an exception in the user Takamaka code, that is allowed to be thrown by the constructorTransactionException- if the transaction could be executed and the store of the node has been expanded with a failed transactionClosedNodeException- if the node is already closedTimeoutException- if no answer arrives before a time windowInterruptedException- if the current thread is interrupted while waiting for an answer to arrive
-