Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.logging
Class ProgressLogRecord

java.lang.Object
  extended by java.util.logging.LogRecord
      extended by de.lmu.ifi.dbs.elki.logging.ProgressLogRecord
All Implemented Interfaces:
Serializable

public class ProgressLogRecord
extends LogRecord

Additionally to the functionality of a LogRecord, a ProgressLogRecord provides information concerning the progress as the name of the progressing task and the percentage of the progress. An example for usage may be:

 partitionProgress.setProcessed(processed++);
 logger.log(new ProgressLogRecord(Level.INFO,Util.status(partitionProgress),partitionProgress.getTask(),partitionProgress.status()));
 
This enables the presentation of the progress in a graphical context.

Author:
Arthur Zimek
See Also:
Serialized Form

Field Summary
private  int percentage
          The percentage of progress.
private static long serialVersionUID
          Generated serial version UID.
private  String task
          The name of the progressing task.
 
Constructor Summary
ProgressLogRecord(Level level, String msg, String task, int percentage)
          Provides a ProgressLogRecord.
 
Method Summary
 int getPercentage()
          Returns the percentage of the progress as set in the constructor.
 String getTask()
          Returns the name of the progressing task.
 
Methods inherited from class java.util.logging.LogRecord
getLevel, getLoggerName, getMessage, getMillis, getParameters, getResourceBundle, getResourceBundleName, getSequenceNumber, getSourceClassName, getSourceMethodName, getThreadID, getThrown, setLevel, setLoggerName, setMessage, setMillis, setParameters, setResourceBundle, setResourceBundleName, setSequenceNumber, setSourceClassName, setSourceMethodName, setThreadID, setThrown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Generated serial version UID.

See Also:
Constant Field Values

task

private String task
The name of the progressing task.


percentage

private int percentage
The percentage of progress.

Constructor Detail

ProgressLogRecord

public ProgressLogRecord(Level level,
                         String msg,
                         String task,
                         int percentage)
Provides a ProgressLogRecord.

Parameters:
level - logging level
msg - log message
task - the name of the progressing task
percentage - the percentage of progress
See Also:
LogRecord.LogRecord(Level, String)
Method Detail

getPercentage

public int getPercentage()
Returns the percentage of the progress as set in the constructor.

Returns:
the percentage of the progress as set in the constructor

getTask

public String getTask()
Returns the name of the progressing task.

Returns:
the name of the progressing task

Release 0.1 (2008-07-10_1838)