Interface SnProgressTracker
- All Known Subinterfaces:
SnCloseableProgressTracker
- All Known Implementing Classes:
DefaultSnCronJobProgressTrackerFactory.SnCronJobProgressTracker
public interface SnProgressTracker
Tracks progress for long running operations. Implementations of this class must be thread-safe.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the current progress.booleanChecks whether cancellation was requested or not.voidRequests cancellation.voidsetProgress(Double value) Sets the current progress.
-
Method Details
-
getProgress
Double getProgress()Returns the current progress.- Returns:
- the current progress
-
setProgress
Sets the current progress.- Parameters:
progress- - the current progress
-
requestCancellation
void requestCancellation()Requests cancellation. -
isCancellationRequested
boolean isCancellationRequested()Checks whether cancellation was requested or not.- Returns:
trueif cancellation was requested,falseotherwise
-