Interface Collector<T>
-
- All Known Subinterfaces:
BiasedCollector
- All Known Implementing Classes:
PrimaryOwnerOnlyCollector
public interface Collector<T>Represents the ack collector for a write operation in triangle algorithm.- Since:
- 9.0
- Author:
- Pedro Ruivo
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CompletableFuture<T>getFuture()voidprimaryException(Throwable throwable)The exception results of the primary owner.voidprimaryResult(T result, boolean success)The write operation's return value.
-
-
-
Method Detail
-
getFuture
CompletableFuture<T> getFuture()
- Returns:
- The
CompletableFuturethat will be completed when all the acks are received.
-
primaryException
void primaryException(Throwable throwable)
The exception results of the primary owner.- Parameters:
throwable- theThrowablethrow by the primary owner
-
primaryResult
void primaryResult(T result, boolean success)
The write operation's return value.- Parameters:
result- the operation's return valuesuccess-trueif it was successful,falseotherwise (for conditional operations).
-
-