| 限定符和类型 | 字段和说明 |
|---|---|
static org.slf4j.Logger |
LOG |
| 构造器和说明 |
|---|
DataBlockingQueue(Object name,
SizeInBytes byteLimit,
int elementLimit,
ToLongFunction<E> getNumBytes) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clear()
The same as
Collection.clear(). |
long |
getNumBytes() |
int |
getNumElements() |
boolean |
offer(E element)
Adds an element to this queue.
|
boolean |
offer(E element,
TimeDuration timeout)
Adds an element to this queue, waiting up to the given timeout.
|
E |
poll()
Poll out the head element from this queue.
|
E |
poll(TimeDuration timeout)
Poll out the head element from this queue, waiting up to the given timeout.
|
<RESULT,THROWABLE extends Throwable> |
pollList(long timeoutMs,
CheckedFunctionWithTimeout<E,RESULT,THROWABLE> getResult,
TriConsumer<E,TimeDuration,TimeoutException> timeoutHandler)
Poll a list of the results within the given timeout.
|
boolean |
remove(E e)
The same as
Collection.remove(Object). |
getByteLimit, getElementLimit, isEmpty, iteratorclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic DataBlockingQueue(Object name, SizeInBytes byteLimit, int elementLimit, ToLongFunction<E> getNumBytes)
public long getNumBytes()
getNumBytes 在类中 DataQueue<E>public int getNumElements()
getNumElements 在类中 DataQueue<E>public void clear()
DataQueueCollection.clear().public boolean offer(E element, TimeDuration timeout) throws InterruptedException
InterruptedExceptionpublic boolean remove(E e)
DataQueueCollection.remove(Object).public E poll(TimeDuration timeout) throws InterruptedException
public <RESULT,THROWABLE extends Throwable> List<RESULT> pollList(long timeoutMs, CheckedFunctionWithTimeout<E,RESULT,THROWABLE> getResult, TriConsumer<E,TimeDuration,TimeoutException> timeoutHandler) throws THROWABLE extends Throwable
DataQueueCopyright © 2017–2023 The Apache Software Foundation. All rights reserved.