Class AbstractMonitor
java.lang.Object
org.eclipse.net4j.util.om.monitor.AbstractMonitor
- All Implemented Interfaces:
OMMonitor, OMMonitorProgress
- Direct Known Subclasses:
Monitor, NestedMonitor
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface OMMonitor
OMMonitor.Async, OMMonitor.AsyncMonitor -
Field Summary
Fields inherited from interface OMMonitor
DEFAULT_TIME_FACTOR, THOUSANDFields inherited from interface 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 Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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
-
forkAsync
-
forkAsync
Description copied from interface:OMMonitorSame as callingforkAsync(ONE). -
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
-