public class

ProgressMeter

extends Object
java.lang.Object
   ↳ com.atlassian.core.util.ProgressMeter

Class Overview

A ProgressMeter class may be used to record progress of an on-going task while this progress is being monitored by another client. To support this use case the class is thread safe.

Summary

Public Constructors
ProgressMeter()
Public Methods
synchronized int getCurrentCount()
synchronized int getPercentageComplete()
synchronized String getStatus()
synchronized int getTotal()
synchronized boolean isCompletedSuccessfully()
This method should only be called once you know the task is complete (which is discovered by calling getPercentageComplete().
synchronized void setCompletedSuccessfully(boolean completedSuccessfully)
synchronized void setCurrentCount(int currentCount)
synchronized void setPercentage(int percentageComplete)
void setPercentage(int count, int total)
Use this method to set the completion %age to object 10 of 30 etc.
synchronized void setStatus(String status)
synchronized void setTotalObjects(int total)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ProgressMeter ()

Public Methods

public synchronized int getCurrentCount ()

public synchronized int getPercentageComplete ()

Returns
  • the percentage completion. A value of 100 can be taken to indicate that progress is finished.

public synchronized String getStatus ()

public synchronized int getTotal ()

public synchronized boolean isCompletedSuccessfully ()

This method should only be called once you know the task is complete (which is discovered by calling getPercentageComplete().

Returns
  • true if the task completed successfully; false if there was an error which prevented the task from completing.

public synchronized void setCompletedSuccessfully (boolean completedSuccessfully)

public synchronized void setCurrentCount (int currentCount)

public synchronized void setPercentage (int percentageComplete)

public void setPercentage (int count, int total)

Use this method to set the completion %age to object 10 of 30 etc.

Parameters
count The current object count in progress
total The total number of objects to be processed

public synchronized void setStatus (String status)

public synchronized void setTotalObjects (int total)

Feedback?
View cookie preferences