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 java.lang.Object implements OMMonitor
- Since:
- 2.0
- Author:
- Eike Stepper
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractMonitor.AsyncTimerTask-
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.om.monitor.OMMonitor
OMMonitor.Async
-
-
Field Summary
-
Fields inherited from interface org.eclipse.net4j.util.om.monitor.OMMonitor
DEFAULT_TIME_FACTOR, THOUSAND
-
Fields inherited from interface org.eclipse.net4j.util.om.monitor.OMMonitorProgress
HUNDRED, ONE, TEN, ZERO
-
-
Constructor Summary
Constructors Constructor Description AbstractMonitor()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description OMMonitorbegin()Same as callingbegin(ONE).OMMonitorbegin(double totalWork)protected AbstractMonitor.AsyncTimerTaskcreateAsyncTimerTask(double work)protected OMMonitorcreateNestedMonitor(double work)voiddone()OMMonitorfork()Same as callingfork(ONE).OMMonitorfork(double work)OMMonitor.AsyncforkAsync()Same as callingforkAsync(ONE).OMMonitor.AsyncforkAsync(double work)protected abstract longgetAsyncSchedulePeriod()protected abstract java.util.TimergetTimer()doublegetTotalWork()doublegetWork()doublegetWorkPercent()booleanhasBegun()protected static doublepercent(double part, double whole)protected abstract voidscheduleAtFixedRate(java.util.TimerTask task, long delay, long period)voidworked()Same as callingworked(ONE).voidworked(double work)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.net4j.util.om.monitor.OMMonitor
checkCanceled, isCanceled
-
-
-
-
Method Detail
-
hasBegun
public boolean hasBegun() throws MonitorCanceledException- Specified by:
hasBegunin interfaceOMMonitor- Throws:
MonitorCanceledException
-
begin
public OMMonitor begin(double totalWork) throws MonitorCanceledException
- Specified by:
beginin interfaceOMMonitor- Throws:
MonitorCanceledException
-
begin
public OMMonitor begin() throws MonitorCanceledException
Description copied from interface:OMMonitorSame as callingbegin(ONE).- Specified by:
beginin interfaceOMMonitor- Throws:
MonitorCanceledException
-
worked
public void worked(double work) throws MonitorCanceledException- Specified by:
workedin interfaceOMMonitor- Throws:
MonitorCanceledException
-
worked
public void worked() throws MonitorCanceledExceptionDescription copied from interface:OMMonitorSame as callingworked(ONE).- Specified by:
workedin interfaceOMMonitor- Throws:
MonitorCanceledException
-
fork
public OMMonitor fork()
Description copied from interface:OMMonitorSame as callingfork(ONE).
-
forkAsync
public OMMonitor.Async forkAsync(double work)
-
forkAsync
public OMMonitor.Async forkAsync()
Description copied from interface:OMMonitorSame as callingforkAsync(ONE).
-
getTotalWork
public double getTotalWork()
- Specified by:
getTotalWorkin interfaceOMMonitorProgress
-
getWork
public double getWork()
- Specified by:
getWorkin interfaceOMMonitorProgress
-
getWorkPercent
public double getWorkPercent()
- Specified by:
getWorkPercentin interfaceOMMonitorProgress
-
createNestedMonitor
protected OMMonitor createNestedMonitor(double work)
-
createAsyncTimerTask
protected AbstractMonitor.AsyncTimerTask createAsyncTimerTask(double work)
-
getAsyncSchedulePeriod
protected abstract long getAsyncSchedulePeriod()
-
getTimer
protected abstract java.util.Timer getTimer()
-
scheduleAtFixedRate
protected abstract void scheduleAtFixedRate(java.util.TimerTask task, long delay, long period)- Since:
- 3.0
-
percent
protected static double percent(double part, double whole)- Since:
- 3.1
-
-