|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.logging.progress.AbstractProgress
public abstract class AbstractProgress
Abstract base class for FiniteProgress objects.
Field Summary | |
---|---|
private long |
lastLogged
For logging rate control. |
private AtomicInteger |
processed
The number of items already processed at a time being. |
private String |
task
The task name. |
Constructor Summary | |
---|---|
AbstractProgress(String task)
Default constructor. |
Method Summary | |
---|---|
abstract StringBuffer |
appendToBuffer(StringBuffer buf)
Serialize a description into a String buffer. |
int |
getProcessed()
Get the number of items already processed at a time being. |
String |
getTask()
Provides the name of the task. |
void |
incrementProcessed()
Increment the processed counter. |
void |
incrementProcessed(Logging logger)
Increment the processed counter. |
void |
setProcessed(int processed)
Sets the number of items already processed at a time being. |
void |
setProcessed(int processed,
Logging logger)
Sets the number of items already processed at a time being. |
protected boolean |
testLoggingRate()
Logging rate control. |
String |
toString()
Returns a String representation of the progress suitable as a message for printing to the command line interface. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface de.lmu.ifi.dbs.elki.logging.progress.Progress |
---|
isComplete |
Field Detail |
---|
private AtomicInteger processed
private String task
private long lastLogged
Constructor Detail |
---|
public AbstractProgress(String task)
task
- Task name.Method Detail |
---|
public String getTask()
public void setProcessed(int processed) throws IllegalArgumentException
processed
- the number of items already processed at a time being
IllegalArgumentException
- if an invalid value was passed.public void setProcessed(int processed, Logging logger) throws IllegalArgumentException
processed
- the number of items already processed at a time beinglogger
- Logger to report to
IllegalArgumentException
- if an invalid value was passed.public int getProcessed()
public abstract StringBuffer appendToBuffer(StringBuffer buf)
appendToBuffer
in interface Progress
buf
- Buffer to serialize to
public String toString()
toString
in interface Progress
toString
in class Object
Object.toString()
public void incrementProcessed()
public void incrementProcessed(Logging logger)
logger
- Logger to report to.protected boolean testLoggingRate()
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |