Package com.illumon.util.progress
Interface StatusCallback
- All Known Implementing Classes:
MergeData
,MinProcessStatus
,PersistentQueryState
,ProcessStatusSubrange
,ProgressLogger
,RemoteCommandProgress
public interface StatusCallback
TODO docs
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
Indicates that no further updates are expected.default void
Indicates that no further updates are expected.default int
Get the current value of the the current step/subrange.int
getValue()
get the current value of the progress object.default StatusCallback
Syntactic sugar for converting the remaining capacity to a subrange.default StatusCallback
remaining
(int pct) Syntactic sugar for converting part of remaining capacity to a subrange.default StatusCallback
subrange
(int min, int max) Get a new status callback representing a sub range of this one.default void
Update the progress % and status message.void
Update the progress % and status message.
-
Method Details
-
update
Update the progress % and status message.- Parameters:
progress
- percent complete (0-100)status
- optional message text
-
update
Update the progress % and status message.- Parameters:
progress
- percent complete (0-100)statusSupplier
- optional message supplier
-
finish
Indicates that no further updates are expected.- Parameters:
status
- optional message
-
finish
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
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 parentmax
- 100% in the subrange corresponds to max in the parent- Returns:
- a new status callback representing the specified subrange of this callback
-
remaining
Syntactic sugar for converting the remaining capacity to a subrange.- Returns:
- a new ProcessStatusSubrange for the remaining part of this one.
-
remaining
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.
-