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 int
DONE
Done(package private) int
index
Index in the queue(package private) HashedTimeoutPriorityQueueImpl.InternalPriorityQueue
queue
The internal priority queue(package private) TimeoutTarget
target
The timeout target(package private) long
time
Time of the timeout(package private) static int
TIMEOUT
In timeout(package private) static int
TOP
Top
-
Constructor Summary
Constructors Modifier Constructor Description private
TimeoutExtImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
cancel()
Cancel this timeout.void
done()
Mark the work as donelong
getTime()
TimeoutTarget
getTimeoutTarget()
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:
getTime
in interfaceTimeoutExt
- Returns:
- the time of this timeout
-
getTimeoutTarget
public TimeoutTarget getTimeoutTarget()
Description copied from interface:TimeoutExt
Get the target of this timeout- Specified by:
getTimeoutTarget
in interfaceTimeoutExt
- Returns:
- the target
-
done
public void done()
Description copied from interface:TimeoutExt
Mark the work as done- Specified by:
done
in interfaceTimeoutExt
-
cancel
public boolean cancel()
Description copied from interface:Timeout
Cancel 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.
-
-