org.eclipse.net4j.util.om.monitor
Class AbstractMonitor
java.lang.Object
org.eclipse.net4j.util.om.monitor.AbstractMonitor
- All Implemented Interfaces:
- OMMonitor, OMMonitorProgress
- Direct Known Subclasses:
- Monitor, NestedMonitor
- public abstract class AbstractMonitor
- extends Object
- implements OMMonitor
- Since:
- 2.0
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractMonitor
public AbstractMonitor()
hasBegun
public boolean hasBegun()
throws MonitorCanceledException
- Specified by:
hasBegun
in interface OMMonitor
- Throws:
MonitorCanceledException
begin
public OMMonitor begin(double totalWork)
throws MonitorCanceledException
- Specified by:
begin
in interface OMMonitor
- Throws:
MonitorCanceledException
begin
public OMMonitor begin()
throws MonitorCanceledException
- Description copied from interface:
OMMonitor
- Same as calling
begin(ONE)
.
- Specified by:
begin
in interface OMMonitor
- Throws:
MonitorCanceledException
worked
public void worked(double work)
throws MonitorCanceledException
- Specified by:
worked
in interface OMMonitor
- Throws:
MonitorCanceledException
worked
public void worked()
throws MonitorCanceledException
- Description copied from interface:
OMMonitor
- Same as calling
worked(ONE)
.
- Specified by:
worked
in interface OMMonitor
- Throws:
MonitorCanceledException
fork
public OMMonitor fork(double work)
- Specified by:
fork
in interface OMMonitor
fork
public OMMonitor fork()
- Description copied from interface:
OMMonitor
- Same as calling
fork(ONE)
.
- Specified by:
fork
in interface OMMonitor
forkAsync
public OMMonitor.Async forkAsync(double work)
- Specified by:
forkAsync
in interface OMMonitor
forkAsync
public OMMonitor.Async forkAsync()
- Description copied from interface:
OMMonitor
- Same as calling
forkAsync(ONE)
.
- Specified by:
forkAsync
in interface OMMonitor
done
public void done()
- Specified by:
done
in interface OMMonitor
getTotalWork
public double getTotalWork()
- Specified by:
getTotalWork
in interface OMMonitorProgress
getWork
public double getWork()
- Specified by:
getWork
in interface OMMonitorProgress
getWorkPercent
public double getWorkPercent()
- Specified by:
getWorkPercent
in interface OMMonitorProgress
createNestedMonitor
protected OMMonitor createNestedMonitor(double work)
createAsyncTimerTask
protected AbstractMonitor.AsyncTimerTask createAsyncTimerTask(double work)
getAsyncSchedulePeriod
protected abstract long getAsyncSchedulePeriod()
getTimer
protected abstract Timer getTimer()
scheduleAtFixedRate
protected abstract void scheduleAtFixedRate(TimerTask task,
long delay,
long period)
- Since:
- 3.0
percent
protected static double percent(double part,
double whole)
- Since:
- 3.1
Copyright (c) 2011, 2012 Eike Stepper (Berlin, Germany) and others.