Interface Scheduler.ScheduleResult

All Known Subinterfaces:
Scheduler.ScheduleResult.Failure, Scheduler.ScheduleResult.Successful
All Known Implementing Classes:
Scheduler.ScheduleResult.AlreadyRunning, Scheduler.ScheduleResult.LowerPriorityThanQueuedCommand, Scheduler.ScheduleResult.LowerPriorityThanRunningCommand, Scheduler.ScheduleResult.Success
Enclosing class:
Scheduler

public static sealed interface Scheduler.ScheduleResult permits Scheduler.ScheduleResult.Successful, Scheduler.ScheduleResult.Failure
Represents possible results of a command scheduling attempt. These can be used either as concrete results after a command was attempted to be scheduled, or as predictive results when checking if a command can be scheduled before committing to it.
  • Method Details

    • command

      Command command()
      The command that was attempted to be scheduled.
      Returns:
      the command that was attempted to be scheduled
    • successful

      boolean successful()
      Whether the scheduling attempt was successful.
      Returns:
      true if the scheduling attempt was successful, false if it failed