Interface IEventCancellationCarrier<T>

Type Parameters:
T - The type of the event.
All Known Implementing Classes:
ForgeEventCancellationCarrier

public interface IEventCancellationCarrier<T>
Determines whether an event of the given type has been canceled or not.

The logic for determining whether an event is canceled or not, along with the cancellation itself is left to the implementor of this interface.

Since:
11.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    cancel(T event)
    Cancels the given event.
    boolean
    isCanceled(T event)
    Returns whether the given event has been canceled or not.
  • Method Details

    • isCanceled

      boolean isCanceled(T event)
      Returns whether the given event has been canceled or not.
      Parameters:
      event - The event whose cancellation status should be determined.
      Returns:
      Whether the event has been canceled.
      Since:
      11.0.0
    • cancel

      void cancel(T event)
      Cancels the given event.

      The cancellation operation must be idempotent, meaning that attempting to cancel an event that has already been canceled before should result in no operations being carried out.

      Parameters:
      event - The event to cancel.
      Since:
      11.0.0