Package io.servicetalk.client.api
Interface ConsumableEvent<T>
- Type Parameters:
T
- The type of event.
- All Known Implementing Classes:
IgnoreConsumedEvent
public interface ConsumableEvent<T>
A container for an event that requires acknowledgement when the event is consumed via
eventConsumed()
.-
Method Details
-
event
T event()Get the event.- Returns:
- the event.
-
eventConsumed
void eventConsumed()Signify theevent()
has been consumed and any side effects have taken place.Implementations of this method are expected to be idempotent, meaning that if the event is already consumed then invoking this method has no effect.
-