Class AbstractMonitor
java.lang.Object
org.eclipse.net4j.util.om.monitor.AbstractMonitor
- All Implemented Interfaces:
OMMonitor,OMMonitorProgress
- Direct Known Subclasses:
Monitor,NestedMonitor
- Since:
- 2.0
- Author:
- Eike Stepper
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.eclipse.net4j.util.om.monitor.OMMonitor
OMMonitor.Async, OMMonitor.AsyncMonitor -
Field Summary
Fields inherited from interface org.eclipse.net4j.util.om.monitor.OMMonitor
DEFAULT_TIME_FACTOR, THOUSANDFields inherited from interface org.eclipse.net4j.util.om.monitor.OMMonitorProgress
HUNDRED, ONE, TEN, ZERO -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbegin()Same as callingbegin(ONE).begin(double totalWork) protected AbstractMonitor.AsyncTimerTaskcreateAsyncTimerTask(double work) protected OMMonitorcreateNestedMonitor(double work) voiddone()fork()Same as callingfork(ONE).fork(double work) Same as callingforkAsync(ONE).forkAsync(double work) protected abstract longprotected abstract TimergetTimer()doubledoublegetWork()doublebooleanhasBegun()protected static doublepercent(double part, double whole) protected abstract voidscheduleAtFixedRate(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, waitMethods inherited from interface org.eclipse.net4j.util.om.monitor.OMMonitor
checkCanceled, isCanceled
-
Constructor Details
-
AbstractMonitor
public AbstractMonitor()
-
-
Method Details
-
hasBegun
- Specified by:
hasBegunin interfaceOMMonitor- Throws:
MonitorCanceledException
-
begin
- Specified by:
beginin interfaceOMMonitor- Throws:
MonitorCanceledException
-
begin
Description copied from interface:OMMonitorSame as callingbegin(ONE).- Specified by:
beginin interfaceOMMonitor- Throws:
MonitorCanceledException
-
worked
- Specified by:
workedin interfaceOMMonitor- Throws:
MonitorCanceledException
-
worked
Description copied from interface:OMMonitorSame as callingworked(ONE).- Specified by:
workedin interfaceOMMonitor- Throws:
MonitorCanceledException
-
fork
-
fork
Description copied from interface:OMMonitorSame as callingfork(ONE). -
forkAsync
-
forkAsync
Description copied from interface:OMMonitorSame as callingforkAsync(ONE). -
done
public void done() -
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
-
createAsyncTimerTask
-
getAsyncSchedulePeriod
protected abstract long getAsyncSchedulePeriod() -
getTimer
-
scheduleAtFixedRate
- Since:
- 3.0
-
percent
protected static double percent(double part, double whole) - Since:
- 3.1
-