| com.tc.util.concurrent.BlockingQueue
All known Subclasses: com.tc.util.concurrent.TCBlockingLinkedQueue,
BlockingQueue | public interface BlockingQueue extends Queue(Code) | | Adds methods to the regular queue interface for blocking queue implementations. Similar to Queue ,
this interface is modelled after the java.util.concurrent.BlockingQueue interface
author: orion |
Method Summary | |
boolean | offer(Object o, long timeout) Place item in queue only if it can be accepted within the given timeout
Parameters: o - the object to offer to the queue (should be non-null) Parameters: timeout - the number of milliseconds to wait. | Object | poll(long timeout) Return and remove an item from channel only if one is available within the given timeout period
Parameters: timeout - the number of milliseconds to wait. | Object | take() Return and remove an item from this queue, possibly waiting indefinitely until such an item exists.
an item from the queue. |
offer | boolean offer(Object o, long timeout) throws InterruptedException(Code) | | Place item in queue only if it can be accepted within the given timeout
Parameters: o - the object to offer to the queue (should be non-null) Parameters: timeout - the number of milliseconds to wait. If less than or equal to zero, do not perform any timed waits true if accepted, else false throws: InterruptedException - if the current thread has been interrupted at a point at which interruption isdetected, in which case the element is guaranteed not to be inserted (i.e., is equivalent to a falsereturn). |
poll | Object poll(long timeout) throws InterruptedException(Code) | | Return and remove an item from channel only if one is available within the given timeout period
Parameters: timeout - the number of milliseconds to wait. If less than or equal to zero, do not perform any timed waits an item, or null if the channel is empty. throws: InterruptedException - if the current thread has been interrupted at a point at which interruption isdetected, in which case state of the channel is unchanged (i.e., equivalent to a null return). |
take | Object take() throws InterruptedException(Code) | | Return and remove an item from this queue, possibly waiting indefinitely until such an item exists.
an item from the queue. Order of the return item (vs. insertion order) is governed by the implementation throws: InterruptedException - if the current thread has been interrupted at a point at which interruption isdetected, in which case state of the queue is unchanged. |
|
|