Class ProgressTracker.Builder
java.lang.Object
com.github.mizosoft.methanol.ProgressTracker.Builder
- Enclosing class:
ProgressTracker
A builder of
ProgressTrackers.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newProgressTracker.bytesTransferredThreshold(long value) Sets the minimum number of transferred bytes for a progress event to be signalled.enclosedProgress(boolean enclosedProgress) If set totrue(default), the sequence of progress events will be enclosed between0%and100%progresses to detect begin and completion events respectively.Sets the executor on whichProgressTracker.Listenermethods are called.timePassedThreshold(Duration duration) Sets the minimum amount of time to pass for a progress event to be signalled.
-
Method Details
-
bytesTransferredThreshold
Sets the minimum number of transferred bytes for a progress event to be signalled. The default value is zero.- Throws:
IllegalArgumentException- if value is negative
-
timePassedThreshold
Sets the minimum amount of time to pass for a progress event to be signalled.- Throws:
IllegalArgumentException- if duration is not positive
-
enclosedProgress
If set totrue(default), the sequence of progress events will be enclosed between0%and100%progresses to detect begin and completion events respectively. -
executor
Sets the executor on whichProgressTracker.Listenermethods are called. If not set, the listener will be signalled inline with body receiver. -
build
Builds a newProgressTracker.
-