public interface TimeoutPriorityQueue
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancels the queue
|
void |
clear()
Clears the queue
|
TimeoutExt |
offer(long time,
TimeoutTarget target)
Add a timeout to the queue
|
TimeoutExt |
peek()
Retrieves but does not remove the top of the queue
or null if there is no such element
|
TimeoutExt |
poll()
Retrieves and removes the top of the queue if it times out
or null if there is no such element
|
TimeoutExt |
poll(long wait)
Retrieves and removes the top of the queue if it times out
or null if there is no such element
|
boolean |
remove(TimeoutExt timeout)
Removes the passed timeout from the queue
|
int |
size() |
TimeoutExt |
take()
Take a timeout when it times out
|
TimeoutExt offer(long time, TimeoutTarget target)
time
- the time of the timeouttarget
- the timeout targetTimeoutExt take()
TimeoutExt poll()
TimeoutExt poll(long wait)
wait
- how to long to wait in milliseconds
if the queue is emptyTimeoutExt peek()
boolean remove(TimeoutExt timeout)
timeout
- void clear()
void cancel()
int size()
Copyright © 2018 JBoss by Red Hat. All rights reserved.