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()
void
primaryException(Throwable throwable)
The exception results of the primary owner.void
primaryResult(T result, boolean success)
The write operation's return value.
-
-
-
Method Detail
-
getFuture
CompletableFuture<T> getFuture()
- Returns:
- The
CompletableFuture
that will be completed when all the acks are received.
-
primaryException
void primaryException(Throwable throwable)
The exception results of the primary owner.- Parameters:
throwable
- theThrowable
throw by the primary owner
-
primaryResult
void primaryResult(T result, boolean success)
The write operation's return value.- Parameters:
result
- the operation's return valuesuccess
-true
if it was successful,false
otherwise (for conditional operations).
-
-