public abstract class AbstractWaitingTask extends Object implements WaitingTask
WaitingTask
. Inside the implementation the methods
startWaiting()
and stopWaiting()
should be used before and
after the task entered the section in which it has to wait.Modifier and Type | Field and Description |
---|---|
protected static long |
NOT_WAITING_SENTINEL |
protected long |
waitingStarted
The time stamp at which the current task started waiting.
|
Constructor and Description |
---|
AbstractWaitingTask() |
Modifier and Type | Method and Description |
---|---|
long |
getTimeWaiting()
Returns the time the task is already waiting.
|
protected void |
startWaiting()
This method should be called before the task enters the section in which
it might wait a long time.
|
protected void |
stopWaiting()
This method should be called after the task has finished the section in
which it might wait a long time.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getId, getProgress
protected static final long NOT_WAITING_SENTINEL
protected long waitingStarted
public long getTimeWaiting()
WaitingTask
getTimeWaiting
in interface WaitingTask
protected void startWaiting()
protected void stopWaiting()
Copyright © 2015. All rights reserved.