Interface Collector<T>
- 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
Modifier and TypeMethodDescriptionvoidprimaryException(Throwable throwable) The exception results of the primary owner.voidprimaryResult(T result, boolean success) The write operation's return value.
-
Method Details
-
getFuture
CompletableFuture<T> getFuture()- Returns:
- The
CompletableFuturethat will be completed when all the acks are received.
-
-
primaryResult
The write operation's return value.- Parameters:
result- the operation's return valuesuccess-trueif it was successful,falseotherwise (for conditional operations).
-