public final class PercentCompleteInformer extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_PERCENTAGE_INCREMENT |
static int |
UNINITIALIZED_PERCENT_COMPLETE_INDICATOR |
static long |
UNINITIALIZED_PROGRESS_INDICATOR |
Constructor and Description |
---|
PercentCompleteInformer(long total) |
PercentCompleteInformer(long total,
int percentageIncrement) |
PercentCompleteInformer(long total,
int percentageIncrement,
Inform inform) |
Modifier and Type | Method and Description |
---|---|
Inform |
getInform() |
StartStopInformer |
getInformer() |
int |
getPercentageIncrement() |
int |
getPercentComplete()
Indicates how far along we are as a percentage
|
long |
getProgress()
Indicates how far along we are
|
long |
getTotal() |
void |
incrementProgress()
Thread safe method for incrementing progress by one
|
void |
incrementProgress(long amount)
Thread safe method for incrementing progress by
amount |
protected boolean |
isEnoughProgress(int newPercentCompleted,
int percentComplete,
int percentageIncrement) |
boolean |
isStarted()
Indicates if we are in the "started" state or not
|
void |
start()
Thread safe method to indicate progress has begun
|
void |
stop()
Thread safe method to indicate progress has stopped
|
public static final int DEFAULT_PERCENTAGE_INCREMENT
public static final long UNINITIALIZED_PROGRESS_INDICATOR
public static final int UNINITIALIZED_PERCENT_COMPLETE_INDICATOR
public PercentCompleteInformer(long total)
public PercentCompleteInformer(long total, int percentageIncrement)
public PercentCompleteInformer(long total, int percentageIncrement, Inform inform)
public boolean isStarted()
public long getProgress()
public int getPercentComplete()
public void start()
public void incrementProgress()
public void incrementProgress(long amount)
amount
public void stop()
protected boolean isEnoughProgress(int newPercentCompleted, int percentComplete, int percentageIncrement)
public int getPercentageIncrement()
public long getTotal()
public StartStopInformer getInformer()
Copyright © 2010–2014 The Kuali Foundation. All rights reserved.