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