@FunctionalInterface public interface Registration
| Modifier and Type | Method and Description |
|---|---|
default Registration |
awaitAck(long timeout,
TimeUnit unit)
Wait for the acknowledgement of the original instruction
this Registration corresponds to. |
CompletableFuture<Void> |
cancel()
Cancel the registration from which this instance was returned.
|
default Registration |
onAck(Runnable runnable)
Registers the given
runnable to this Registration to be executed when the acknowledgement
of this Registration is received. |
CompletableFuture<Void> cancel()
CompletableFuture of Void to react when this Registration has been
canceleddefault Registration awaitAck(long timeout, TimeUnit unit) throws TimeoutException, InterruptedException
this Registration corresponds to. Allows
for the addition of further logic to this Registration, like invoking onAck(Runnable) for
example.timeout - the duration to wait until the operation has been acknowledgedunit - the TimeUnit for the given timeout to wait until the operation has been
acknowledgedthis Registration to support a fluent APITimeoutException - is thrown when the given timeout and unit is surpassedInterruptedException - is thrown when the thread waiting for the acknowledgement is interrupteddefault Registration onAck(Runnable runnable)
runnable to this Registration to be executed when the acknowledgement
of this Registration is received. Allows for the addition of further logic to this
Registration, like invoking awaitAck(long, TimeUnit) for example.runnable - the Runnable to execute when the acknowledgement of this Registration is
receivedthis Registration to support a fluent APICopyright © 2020–2022 AxonIQ BV. All rights reserved.