T - The queue data type.public interface AsyncQueue<T> extends AsyncCollection<T>
If the current Vert.x instance is a Hazelcast clustered instance, the queue will be backed by a Hazelcast queue. Otherwise, the queue will be backed by a Vert.x shared data map.
| Modifier and Type | Method and Description |
|---|---|
void |
element(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<T>> resultHandler)
Retrieves but does not remove the head of the queue.
|
void |
offer(T value)
Inserts the element into the queue if it's immediately possible to do so.
|
void |
offer(T value,
org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Boolean>> doneHandler)
Inserts the element into the queue if it's immediately possible to do so.
|
void |
peek(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<T>> resultHandler)
Retrieves but does not remove the head of the queue.
|
void |
poll(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<T>> resultHandler)
Retrieves and removed the head of the queue.
|
void |
remove(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<T>> resultHandler)
Retrieves and removed the head of the queue.
|
void offer(T value)
value - The value to insert.void offer(T value, org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<Boolean>> doneHandler)
value - The value to insert.doneHandler - An asynchronous handler to be called once complete.void element(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<T>> resultHandler)
resultHandler - An asynchronous handler to be called with the result.void peek(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<T>> resultHandler)
null.resultHandler - An asynchronous handler to be called with the result.void poll(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<T>> resultHandler)
null.resultHandler - An asynchronous handler to be called with the result.void remove(org.vertx.java.core.Handler<org.vertx.java.core.AsyncResult<T>> resultHandler)
resultHandler - An asynchronous handler to be called with the result.Copyright © 2013-2014. All Rights Reserved.