Interface Cancellable

All Known Subinterfaces:
LogBroadcastEvent, LogNetworkPublishEvent, LogNotifyEvent, LogPublishEvent, PreNetworkSyncEvent, PreSyncEvent, UserUnloadEvent

public interface Cancellable
Represents an event that can be cancelled
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets an AtomicBoolean holding the cancellation state of the event
    default boolean
    Returns true if the event is currently cancelled.
    default boolean
    Returns true if the event is not currently cancelled.
    default boolean
    setCancelled(boolean cancelled)
    Sets the cancellation state of the event.
  • Method Details

    • cancellationState

      @NonNull AtomicBoolean cancellationState()
      Gets an AtomicBoolean holding the cancellation state of the event
      Returns:
      the cancellation
    • isCancelled

      default boolean isCancelled()
      Returns true if the event is currently cancelled.
      Returns:
      if the event is cancelled
    • isNotCancelled

      default boolean isNotCancelled()
      Returns true if the event is not currently cancelled.
      Returns:
      if the event is not cancelled
    • setCancelled

      default boolean setCancelled(boolean cancelled)
      Sets the cancellation state of the event.
      Parameters:
      cancelled - the new state
      Returns:
      the previous state