Interface ActivityReporter.Activity

All Superinterfaces:
AutoCloseable, NoThrowAutoCloseable
Enclosing interface:
ActivityReporter

public static interface ActivityReporter.Activity extends NoThrowAutoCloseable
An Activity allows updating progress and signaling when the ActivityReporter.Activity is finished.
  • Method Details

    • activity

      void activity(String activity)
      Updates the name of the activity
    • worked

      void worked(long amount)
      Update the local work amount. Has no effect if the ActivityReporter.Activity was started using a dynamic amount Supplier.
    • done

      void done()
      Signals that this ActivityReporter.Activity is done, removing it from the managing ActivityReporter.
    • duration

      long duration()
      Return the amount of milliseconds since the activity has been started.
    • isCancelRequested

      boolean isCancelRequested()
      Returns:
      whether cancellation is requested
    • workAndCancelIfRequested

      default void workAndCancelIfRequested(long amount)
    • close

      default void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface NoThrowAutoCloseable