java.lang.Object
dev.engine_room.flywheel.impl.task.Flag

public final class Flag extends Object
A flag that can be raised and lowered in a thread-safe fashion.
Useful when combined with RaisePlan.
  • Constructor Details

    • Flag

      public Flag(@Nullable @Nullable String name)
    • Flag

      public Flag()
  • Method Details

    • raise

      public void raise()
      Raise this flag indicating a key point in execution.
      If the flag was already raised, this method does nothing.
    • lower

      public void lower()
      Lower this flag that may have been previously raised.
      If the flag was never raised, this method does nothing.
    • isRaised

      public boolean isRaised()
      Check if this flag is raised.
      Returns:
      true if the flag is raised.
    • isLowered

      public boolean isLowered()
      Check if this flag is lowered.
      Returns:
      true if the flag is lowered.
    • name

      @Nullable public @Nullable String name()
    • toString

      public String toString()
      Overrides:
      toString in class Object