Package com.atlassian.jira.task
Class ScalingTaskProgessSink
java.lang.Object
com.atlassian.jira.task.ScalingTaskProgessSink
- All Implemented Interfaces:
TaskProgressSink
Takes the "virtual progress" made and scales it into an "actual progress" for the contained sink. For example,
this can take the progress range from virtual range [0, 100] and map it to the actual range [23, 47] on the
contained sink.
- Since:
- v3.13
-
Field Summary
Fields inherited from interface com.atlassian.jira.task.TaskProgressSink
NULL_SINK
-
Constructor Summary
ConstructorsConstructorDescriptionScalingTaskProgessSink
(long actualStart, long actualEnd, long virtualStart, long virtualEnd, TaskProgressSink delegateSink) Create the sink with the specified virtual and actual progress ranges.ScalingTaskProgessSink
(long actualStart, long actualEnd, TaskProgressSink delegateSink) Create the sink with the specified actual range. -
Method Summary
Modifier and TypeMethodDescriptionvoid
makeProgress
(long taskProgress, String currentSubTask, String message) This method can be called to indicate that progress is being made by a task.
-
Constructor Details
-
ScalingTaskProgessSink
public ScalingTaskProgessSink(long actualStart, long actualEnd, long virtualStart, long virtualEnd, TaskProgressSink delegateSink) Create the sink with the specified virtual and actual progress ranges.- Parameters:
actualStart
- the start of the actual range inclusive.actualEnd
- the end of the actual range inclusive.virtualStart
- the start of the virtual range inclusive.virtualEnd
- the end of the virtual range inclusive.delegateSink
- the sink to actually report progress on.
-
ScalingTaskProgessSink
Create the sink with the specified actual range. The virtual range will be set to [0, 100].- Parameters:
actualStart
- the start of the actual range inclusive.actualEnd
- the end of the actual range inclusive.delegateSink
- the sink to actually report progress on.
-
-
Method Details
-
makeProgress
This method can be called to indicate that progress is being made by a task.- Specified by:
makeProgress
in interfaceTaskProgressSink
- Parameters:
taskProgress
- the current "virtual progress" for the task.currentSubTask
- the name of the current sub task or null if there isnt onemessage
- an optional message about the progress or null
-