E - queue entry typepublic interface DistributedQueue<E>
| Modifier and Type | Method and Description |
|---|---|
default boolean |
isEmpty()
Returns true if queue has elements in it.
|
E |
peek()
Returns an entry from the queue without removing it.
|
CompletableFuture<E> |
pop()
If the queue is non-empty, an entry will be removed from the queue and the returned future
will be immediately completed with it.
|
void |
push(E entry)
Inserts an entry into the queue.
|
long |
size()
Returns total number of entries in the queue.
|
long size()
default boolean isEmpty()
void push(E entry)
entry - entry to insertCompletableFuture<E> pop()
E peek()
Copyright © 2015. All rights reserved.