public class StepTaskProgressSink extends Object implements TaskProgressSink
This can be used to track the progress of a task that is made up of a number of individual steps. For example, migrating issue workflow requires that each issue in a project be updated with the new workflow. This class can be used to output a percentage based on the number of issues currently processed using:
TaskProgressSink stepSink = new StepTaskProgressSink(0, 100, numberOfIssues, rootSink).
for (each issue)
{
stepSink.makeProgress(currentIssue, "Migrating Issue Workflow", "Processing issue.....");
}
NULL_SINK| Constructor and Description |
|---|
StepTaskProgressSink(long startProgress,
long endProgress,
long actions,
TaskProgressSink sink)
Create the Sink with the passed parameters.
|
| Modifier and Type | Method and Description |
|---|---|
void |
makeProgress(long taskProgress,
String currentSubTask,
String message)
This method can be called to indicate that progress is being made by a task.
|
public StepTaskProgressSink(long startProgress,
long endProgress,
long actions,
TaskProgressSink sink)
startProgress - the start of the range.endProgress - the end of the range.actions - the number of actions to divide the range into.sink - the sink actually used to publish the results.public void makeProgress(long taskProgress,
String currentSubTask,
String message)
makeProgress in interface TaskProgressSinktaskProgress - the current step.currentSubTask - the name of the current sub task or null if there isnt onemessage - an optional message about the progress or nullCopyright © 2002-2024 Atlassian. All Rights Reserved.