Package io.bdeploy.common
Interface ActivityReporter.Activity
- All Superinterfaces:
AutoCloseable,NoThrowAutoCloseable
- Enclosing interface:
- ActivityReporter
An Activity allows updating progress and signaling when the
ActivityReporter.Activity
is finished.-
Method Summary
Modifier and TypeMethodDescriptionvoidUpdates the name of the activitydefault voidclose()voiddone()Signals that thisActivityReporter.Activityis done, removing it from the managingActivityReporter.longduration()Return the amount of milliseconds since the activity has been started.booleandefault voidworkAndCancelIfRequested(long amount) voidworked(long amount) Update the local work amount.
-
Method Details
-
activity
Updates the name of the activity -
worked
void worked(long amount) Update the local work amount. Has no effect if theActivityReporter.Activitywas started using a dynamic amountSupplier. -
done
void done()Signals that thisActivityReporter.Activityis done, removing it from the managingActivityReporter. -
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:
closein interfaceAutoCloseable- Specified by:
closein interfaceNoThrowAutoCloseable
-