Class OperationManager.ScheduledOperation

java.lang.Object
com.globalmentor.model.OperationManager.ScheduledOperation
Enclosing class:
OperationManager

protected static class OperationManager.ScheduledOperation extends Object
Encapsulates an operation that has been scheduled, along with any delay or repeat.
Author:
Garret Wilson
  • Constructor Details

    • ScheduledOperation

      public ScheduledOperation(Operation operation, Duration delayTime, boolean repeated)
      Constructor.
      Parameters:
      operation - The scheduled operation.
      delayTime - The delay past the scheduled time before the operation should begin (which may be 0).
      repeated - Whether this operation should be repeated.
      Throws:
      NullPointerException - if the given operation and/or delay time is null.
  • Method Details

    • getOperation

      public Operation getOperation()
      Returns:
      The scheduled operation.
    • getScheduledTime

      public Instant getScheduledTime()
      Returns:
      The time the operation was scheduled.
    • resetScheduledTime

      public Instant resetScheduledTime()
      Resets the scheduled time to the current time.
      Returns:
      The new scheduled time.
    • getDelayDuration

      public Duration getDelayDuration()
      Returns:
      The delay past the scheduled time before the operation should begin (which may be 0).
    • isRepeated

      public boolean isRepeated()
      Returns:
      Whether this operation should be repeated.