Interface StatusCallback

All Known Implementing Classes:
MergeData, MinProcessStatus, PersistentQueryState, ProcessStatusSubrange, ProgressLogger, RemoteCommandProgress

public interface StatusCallback
TODO docs
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    finish(String status)
    Indicates that no further updates are expected.
    default void
    finish(Supplier<String> statusSupplier)
    Indicates that no further updates are expected.
    default int
    Get the current value of the the current step/subrange.
    int
    get the current value of the progress object.
    Syntactic sugar for converting the remaining capacity to a subrange.
    remaining(int pct)
    Syntactic sugar for converting part of remaining capacity to a subrange.
    subrange(int min, int max)
    Get a new status callback representing a sub range of this one.
    default void
    update(int progress, String status)
    Update the progress % and status message.
    void
    update(int progress, Supplier<String> statusSupplier)
    Update the progress % and status message.
  • Method Details

    • update

      default void update(int progress, String status)
      Update the progress % and status message.
      Parameters:
      progress - percent complete (0-100)
      status - optional message text
    • update

      void update(int progress, Supplier<String> statusSupplier)
      Update the progress % and status message.
      Parameters:
      progress - percent complete (0-100)
      statusSupplier - optional message supplier
    • finish

      default void finish(String status)
      Indicates that no further updates are expected.
      Parameters:
      status - optional message
    • finish

      default void finish(Supplier<String> statusSupplier)
      Indicates that no further updates are expected.
      Parameters:
      statusSupplier - optional message supplier
    • getValue

      int getValue()
      get the current value of the progress object.
      Returns:
      the % complete of the topmost ProcessStatus - a number between 1 and 100
    • getStepValue

      default int getStepValue()
      Get the current value of the the current step/subrange.
      Returns:
      the % complete of the current step - a number between 1 and 100
    • subrange

      default StatusCallback subrange(int min, int max)
      Get a new status callback representing a sub range of this one. TODO: it's iffy whether this belongs in the interface, but is pretty handy. Could easily be a factory.
      Parameters:
      min - 0% in the subrange corresponds to min in the parent
      max - 100% in the subrange corresponds to max in the parent
      Returns:
      a new status callback representing the specified subrange of this callback
    • remaining

      default StatusCallback remaining()
      Syntactic sugar for converting the remaining capacity to a subrange.
      Returns:
      a new ProcessStatusSubrange for the remaining part of this one.
    • remaining

      default StatusCallback remaining(int pct)
      Syntactic sugar for converting part of remaining capacity to a subrange.
      Returns:
      a new ProcessStatusSubrange for pct percent of the remaining part of this one.