AsyncQueueRecord type
| Modifier and Type | Class and Description |
|---|---|
| public static interface |
| Modifier and Type | Field and Description |
|---|---|
| private volatile E | |
| private static final AtomicReferenceFieldUpdater | |
| private volatile boolean | |
| private final TaskQueue. | |
| private final Queue | queue
The queue of tasks, which will be processed asynchronously |
| private volatile int | |
| private static final AtomicIntegerFieldUpdater | |
| private volatile int | |
| private static final AtomicIntegerFieldUpdater | |
| protected final Queue |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public boolean | |
| public static <E extends AsyncQueueRecord | |
| public void | |
| public boolean | |
| public Queue | Returns: the queue of tasks, which will be processed asynchronouslyGet the queue of tasks, which will be processed asynchronously |
| public boolean | |
| public void | |
| public void | |
| public void | |
| private void | |
| public void | |
| public void | |
| public E | Returns: the current processing taskGet the current processing task, if the current in not set, take the task from the queue. |
| public E | |
| private WriteHandler | |
| public int | Returns: the new memory (in bytes) consumed by the queue.Releases memory space in the queue. |
| public int | Returns: the new memory (in bytes) consumed by the queue.Releases memory space in the queue and notifies registered |
| public boolean | Returns: true if tasked was removed, or false otherwise.the task to remove. task)Remove the task from queue. |
| private boolean | |
| public int | Returns: the new memory (in bytes) consumed by the queue.Reserves memory space in the queue. |
| public void | |
| public int | |
| public int |
| currentElement | back to summary |
|---|---|
| private volatile E currentElement | |
| currentElementUpdater | back to summary |
|---|---|
| private static final AtomicReferenceFieldUpdater<TaskQueue<E extends AsyncQueueRecord<R>>, AsyncQueueRecord<R>> currentElementUpdater | |
| isClosed | back to summary |
|---|---|
| private volatile boolean isClosed | |
| maxQueueSizeHolder | back to summary |
|---|---|
| private final TaskQueue. | |
| queue | back to summary |
|---|---|
| private final Queue<E> queue The queue of tasks, which will be processed asynchronously | |
| spaceInBytes | back to summary |
|---|---|
| private volatile int spaceInBytes | |
| spaceInBytesUpdater | back to summary |
|---|---|
| private static final AtomicIntegerFieldUpdater<TaskQueue<E extends AsyncQueueRecord<R>>> spaceInBytesUpdater | |
| writeHandlersCounter | back to summary |
|---|---|
| private volatile int writeHandlersCounter | |
| writeHandlersCounterUpdater | back to summary |
|---|---|
| private static final AtomicIntegerFieldUpdater<TaskQueue<E extends AsyncQueueRecord<R>>> writeHandlersCounterUpdater | |
| writeHandlersQueue | back to summary |
|---|---|
| protected final Queue<WriteHandler> writeHandlersQueue | |
| TaskQueue | back to summary |
|---|---|
| protected TaskQueue(final TaskQueue. | |
| checkWriteHandlerOnClose | back to summary |
|---|---|
| private void checkWriteHandlerOnClose(final WriteHandler writeHandler) | |
| compareAndSetCurrentElement | back to summary |
|---|---|
| public boolean compareAndSetCurrentElement(final E expected, final E newValue) | |
| createTaskQueue | back to summary |
|---|---|
| public static <E extends AsyncQueueRecord | |
| doNotify | back to summary |
|---|---|
| public void doNotify() Notifies processing the queue by write handlers. | |
| forgetWritePossible | back to summary |
|---|---|
| public boolean forgetWritePossible(final WriteHandler writeHandler) | |
| getQueue | back to summary |
|---|---|
| public Queue Get the queue of tasks, which will be processed asynchronously
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() | |
| notifyWritePossible | back to summary |
|---|---|
| public void notifyWritePossible(final WriteHandler writeHandler) | |
| notifyWritePossible | back to summary |
|---|---|
| public void notifyWritePossible(final WriteHandler writeHandler, final int maxQueueSize) | |
| offer | back to summary |
|---|---|
| public void offer(final E task) Add the new task into the task queue.
| |
| offerWriteHandler | back to summary |
|---|---|
| private void offerWriteHandler(final WriteHandler writeHandler) | |
| onClose | back to summary |
|---|---|
| public void onClose() | |
| onClose | back to summary |
|---|---|
| public void onClose(final Throwable cause) | |
| peek | back to summary |
|---|---|
| public E peek() Get the current processing task, if the current in not set, take the task from the queue. Note after this operation call, the current element could be removed from the queue using
| |
| poll | back to summary |
|---|---|
| public E poll() Pools the current processing task. Note after this operation call, any element could be put at the head of the queue
using
| |
| pollWriteHandler | back to summary |
|---|---|
| private WriteHandler pollWriteHandler() | |
| releaseSpace | back to summary |
|---|---|
| public int releaseSpace(final int amount) Releases memory space in the queue.
| |
| releaseSpaceAndNotify | back to summary |
|---|---|
| public int releaseSpaceAndNotify(final int amount) Releases memory space in the queue and notifies registered
| |
| remove | back to summary |
|---|---|
| public boolean remove(final E task) Remove the task from queue.
| |
| removeWriteHandler | back to summary |
|---|---|
| private boolean removeWriteHandler(final WriteHandler writeHandler) | |
| reserveSpace | back to summary |
|---|---|
| public int reserveSpace(final int amount) Reserves memory space in the queue.
| |
| setCurrentElement | back to summary |
|---|---|
| public void setCurrentElement(final E task) Set current task element.
| |
| size | back to summary |
|---|---|
| public int size() Returns the number of queued bytes.
| |
| spaceInBytes | back to summary |
|---|---|
| public int spaceInBytes() Returns the number of queued bytes.
| |
| Modifier and Type | Method and Description |
|---|---|
| public int |
| getMaxQueueSize | back to summary |
|---|---|
| public int getMaxQueueSize() | |