get the current byte size in the queue
get the current byte size in the queue
current queue size in bytes
remove all the items in the queue
Iterator for the queue
Iterator for the queue
Iterator for the queue
Please refer to java.util.concurrent.BlockingQueue#offer.
Please refer to java.util.concurrent.BlockingQueue#offer. Put an element to the tail of the queue, return false immediately if queue is full
The element to put into queue
true on succeed, false on failure
InterruptedException
if interrupted during waiting
NullPointerException
if element is null
Please refer to java.util.concurrent.BlockingQueue#offer An element can be enqueued provided the current size (in number of elements) is within the configured capacity and the current size in bytes of the queue is within the configured byte capacity.
Please refer to java.util.concurrent.BlockingQueue#offer An element can be enqueued provided the current size (in number of elements) is within the configured capacity and the current size in bytes of the queue is within the configured byte capacity. i.e., the element may be enqueued even if adding it causes the queue's size in bytes to exceed the byte capacity.
the element to put into the queue
the amount of time to wait before the expire the operation
the time unit of timeout parameter, default to millisecond
true if the element is put into queue, false if it is not
InterruptedException
if interrupted during waiting
NullPointerException
if element is null
Please refer to java.util.concurrent.BlockingQueue#poll Get an element from the head of queue.
Please refer to java.util.concurrent.BlockingQueue#poll Get an element from the head of queue.
the first element in the queue, null if queue is empty
Please refer to java.util.concurrent.BlockingQueue#poll Get an element from the head of queue.
Please refer to java.util.concurrent.BlockingQueue#poll Get an element from the head of queue. Wait for some time if the queue is empty.
the amount of time to wait if the queue is empty
the unit type
the first element in the queue, null if queue is empty
Please refer to java.util.concurrent.BlockingQueue#put.
Please refer to java.util.concurrent.BlockingQueue#put. Put an element to the tail of the queue, block if queue is full
The element to put into queue
true on succeed, false on failure
InterruptedException
if interrupted during waiting
NullPointerException
if element is null
get the remaining bytes capacity of the queue
get the remaining bytes capacity of the queue
the remaining bytes capacity of the queue
get the number of unused slots in the queue
get the number of unused slots in the queue
the number of unused slots in the queue
(Changed in version 2.9.0) The behavior of scanRight
has changed. The previous behavior can be reproduced with scanRight.reverse.
get the number of elements in the queue
get the number of elements in the queue
number of elements in the queue
Please refer to java.util.concurrent.BlockingQueue#take Get an element from the head of the queue, block if the queue is empty
Please refer to java.util.concurrent.BlockingQueue#take Get an element from the head of the queue, block if the queue is empty
the first element in the queue, null if queue is empty
(Changed in version 2.9.0) transpose
throws an IllegalArgumentException
if collections are not uniformly sized.
A blocking queue that have size limits on both number of elements and number of bytes.