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 Summary

    Modifier and Type
    Method
    Description
    Get the event.
    void
    Signify the event() has been consumed and any side effects have taken place.
  • Method Details

    • event

      T event()
      Get the event.
      Returns:
      the event.
    • eventConsumed

      void eventConsumed()
      Signify the event() 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.