Package org.jboss.util.timeout
Class HashedTimeoutPriorityQueueImpl.TimeoutExtImpl
- java.lang.Object
-
- org.jboss.util.timeout.HashedTimeoutPriorityQueueImpl.TimeoutExtImpl
-
- All Implemented Interfaces:
Timeout,TimeoutExt
- Enclosing class:
- HashedTimeoutPriorityQueueImpl
private class HashedTimeoutPriorityQueueImpl.TimeoutExtImpl extends java.lang.Object implements TimeoutExt
Our private Timeout implementation.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static intDONEDone(package private) intindexIndex in the queue(package private) HashedTimeoutPriorityQueueImpl.InternalPriorityQueuequeueThe internal priority queue(package private) TimeoutTargettargetThe timeout target(package private) longtimeTime of the timeout(package private) static intTIMEOUTIn timeout(package private) static intTOPTop
-
Constructor Summary
Constructors Modifier Constructor Description privateTimeoutExtImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancancel()Cancel this timeout.voiddone()Mark the work as donelonggetTime()TimeoutTargetgetTimeoutTarget()Get the target of this timeout
-
-
-
Field Detail
-
TOP
static final int TOP
Top- See Also:
- Constant Field Values
-
DONE
static final int DONE
Done- See Also:
- Constant Field Values
-
TIMEOUT
static final int TIMEOUT
In timeout- See Also:
- Constant Field Values
-
queue
HashedTimeoutPriorityQueueImpl.InternalPriorityQueue queue
The internal priority queue
-
index
int index
Index in the queue
-
time
long time
Time of the timeout
-
target
TimeoutTarget target
The timeout target
-
-
Method Detail
-
getTime
public long getTime()
- Specified by:
getTimein interfaceTimeoutExt- Returns:
- the time of this timeout
-
getTimeoutTarget
public TimeoutTarget getTimeoutTarget()
Description copied from interface:TimeoutExtGet the target of this timeout- Specified by:
getTimeoutTargetin interfaceTimeoutExt- Returns:
- the target
-
done
public void done()
Description copied from interface:TimeoutExtMark the work as done- Specified by:
donein interfaceTimeoutExt
-
cancel
public boolean cancel()
Description copied from interface:TimeoutCancel this timeout. It is guaranteed that on return from this method this timer is no longer active. This means that either it has been cancelled and the timeout will not happen, or (in case of late cancel) the timeout has happened and the timeout callback function has returned. On return from this method this instance should no longer be used. The reason for this is that an implementation may reuse cancelled timeouts, and at return the instance may already be in use for another timeout.
-
-