public abstract class AbstractMonitor extends Object implements OMMonitor
Modifier and Type | Class and Description |
---|---|
static class |
AbstractMonitor.AsyncTimerTask |
OMMonitor.Async
DEFAULT_TIME_FACTOR, THOUSAND
HUNDRED, ONE, TEN, ZERO
Constructor and Description |
---|
AbstractMonitor() |
Modifier and Type | Method and Description |
---|---|
OMMonitor |
begin()
Same as calling
begin(ONE) . |
OMMonitor |
begin(double totalWork) |
protected AbstractMonitor.AsyncTimerTask |
createAsyncTimerTask(double work) |
protected OMMonitor |
createNestedMonitor(double work) |
void |
done() |
OMMonitor |
fork()
Same as calling
fork(ONE) . |
OMMonitor |
fork(double work) |
OMMonitor.Async |
forkAsync()
Same as calling
forkAsync(ONE) . |
OMMonitor.Async |
forkAsync(double work) |
protected abstract long |
getAsyncSchedulePeriod() |
protected abstract Timer |
getTimer() |
double |
getTotalWork() |
double |
getWork() |
double |
getWorkPercent() |
boolean |
hasBegun() |
protected static double |
percent(double part,
double whole) |
protected abstract void |
scheduleAtFixedRate(TimerTask task,
long delay,
long period) |
void |
worked()
Same as calling
worked(ONE) . |
void |
worked(double work) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkCanceled, isCanceled
public boolean hasBegun() throws MonitorCanceledException
hasBegun
in interface OMMonitor
MonitorCanceledException
public OMMonitor begin(double totalWork) throws MonitorCanceledException
begin
in interface OMMonitor
MonitorCanceledException
public OMMonitor begin() throws MonitorCanceledException
OMMonitor
begin(ONE)
.begin
in interface OMMonitor
MonitorCanceledException
public void worked(double work) throws MonitorCanceledException
worked
in interface OMMonitor
MonitorCanceledException
public void worked() throws MonitorCanceledException
OMMonitor
worked(ONE)
.worked
in interface OMMonitor
MonitorCanceledException
public OMMonitor fork()
OMMonitor
fork(ONE)
.public OMMonitor.Async forkAsync(double work)
public OMMonitor.Async forkAsync()
OMMonitor
forkAsync(ONE)
.public double getTotalWork()
getTotalWork
in interface OMMonitorProgress
public double getWork()
getWork
in interface OMMonitorProgress
public double getWorkPercent()
getWorkPercent
in interface OMMonitorProgress
protected OMMonitor createNestedMonitor(double work)
protected AbstractMonitor.AsyncTimerTask createAsyncTimerTask(double work)
protected abstract long getAsyncSchedulePeriod()
protected abstract Timer getTimer()
protected abstract void scheduleAtFixedRate(TimerTask task, long delay, long period)
protected static double percent(double part, double whole)
Copyright (c) 2011-2014 Eike Stepper (Berlin, Germany) and others.