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 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, THOUSAND
Fields inherited from interface org.eclipse.net4j.util.om.monitor.OMMonitorProgress
HUNDRED, ONE, TEN, ZERO
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbegin()
Same as callingbegin(ONE)
.begin
(double totalWork) protected AbstractMonitor.AsyncTimerTask
createAsyncTimerTask
(double work) protected OMMonitor
createNestedMonitor
(double work) void
done()
fork()
Same as callingfork(ONE)
.fork
(double work) Same as callingforkAsync(ONE)
.forkAsync
(double work) protected abstract long
protected abstract Timer
getTimer()
double
double
getWork()
double
boolean
hasBegun()
protected static double
percent
(double part, double whole) protected abstract void
scheduleAtFixedRate
(TimerTask task, long delay, long period) void
worked()
Same as callingworked(ONE)
.void
worked
(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
-
Constructor Details
-
AbstractMonitor
public AbstractMonitor()
-
-
Method Details
-
hasBegun
- Specified by:
hasBegun
in interfaceOMMonitor
- Throws:
MonitorCanceledException
-
begin
- Specified by:
begin
in interfaceOMMonitor
- Throws:
MonitorCanceledException
-
begin
Description copied from interface:OMMonitor
Same as callingbegin(ONE)
.- Specified by:
begin
in interfaceOMMonitor
- Throws:
MonitorCanceledException
-
worked
- Specified by:
worked
in interfaceOMMonitor
- Throws:
MonitorCanceledException
-
worked
Description copied from interface:OMMonitor
Same as callingworked(ONE)
.- Specified by:
worked
in interfaceOMMonitor
- Throws:
MonitorCanceledException
-
fork
-
fork
Description copied from interface:OMMonitor
Same as callingfork(ONE)
. -
forkAsync
-
forkAsync
Description copied from interface:OMMonitor
Same as callingforkAsync(ONE)
. -
done
public void done() -
getTotalWork
public double getTotalWork()- Specified by:
getTotalWork
in interfaceOMMonitorProgress
-
getWork
public double getWork()- Specified by:
getWork
in interfaceOMMonitorProgress
-
getWorkPercent
public double getWorkPercent()- Specified by:
getWorkPercent
in 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
-