netkit.util
Class ComputeProcess
java.lang.Object
netkit.util.ComputeProcess
- Direct Known Subclasses:
- ApproximateCentralities.ApproximateCentrality
public abstract class ComputeProcess
- extends java.lang.Object
Field Summary |
protected java.util.logging.Logger |
logger
|
protected double |
progress
|
Method Summary |
boolean |
active()
|
java.lang.String |
name()
|
double |
progress()
|
protected abstract boolean |
run()
This method is the main computation method. |
void |
start()
|
void |
stop()
|
void |
stop(boolean wait)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected final java.util.logging.Logger logger
progress
protected double progress
ComputeProcess
protected ComputeProcess(java.lang.String name)
progress
public double progress()
active
public boolean active()
stop
public void stop()
stop
public void stop(boolean wait)
start
public void start()
name
public java.lang.String name()
run
protected abstract boolean run()
- This method is the main computation method. It should check the active boolean
regularly to see if it should abort the process.
- Returns:
- false if it aborted, true otherwise