public interface RemoteBlockingQueue extends Remote
BlockingQueue
and is implemented using standard Java RMI.| Modifier and Type | Method and Description |
|---|---|
boolean |
offer(Object o)
Inserts the specified element into this queue, if
possible.
|
boolean |
offer(Object o,
long timeout,
TimeUnit unit)
Inserts the specified element into this queue, waiting if necessary
up to the specified wait time for space to become available.
|
Object |
peek()
Retrieves, but does not remove, the head of this queue,
returning null if this queue is empty.
|
Object |
poll()
Retrieves and removes the head of this queue.
|
Object |
poll(long timeout,
TimeUnit unit)
Retrieves and removes the head of this queue, waiting
if necessary up to the specified wait time if no elements are
present on this queue.
|
void |
put(Object o)
Adds the specified element to this queue, waiting if necessary for
space to become available.
|
Object |
take()
Retrieves and removes the head of this queue, waiting
if no elements are present on this queue.
|
boolean offer(Object o) throws RemoteException
Collection.add(E), which can fail to insert an element
only by throwing an exception.o - the element to add.NullPointerException - if the specified element is null.RemoteExceptionboolean offer(Object o, long timeout, TimeUnit unit) throws InterruptedException, RemoteException
o - the element to addtimeout - how long to wait before giving up, in units of
unitunit - a TimeUnit determining how to interpret the
timeout parameterInterruptedException - if interrupted while waiting.NullPointerException - if the specified element is null.RemoteExceptionObject poll(long timeout, TimeUnit unit) throws InterruptedException, RemoteException
timeout - how long to wait before giving up, in units of
unitunit - a TimeUnit determining how to interpret the
timeout parameterInterruptedException - if interrupted while waiting.RemoteExceptionObject poll() throws RemoteException
NoSuchElementException - if this queue is empty.RemoteExceptionObject take() throws InterruptedException, RemoteException
InterruptedException - if interrupted while waiting.RemoteExceptionvoid put(Object o) throws InterruptedException, RemoteException
o - the element to addInterruptedException - if interrupted while waiting.NullPointerException - if the specified element is null.RemoteExceptionObject peek() throws RemoteException
RemoteExceptionCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.