T
- The type of elements in the Queue.java.util.Collection<T>
, DistributedDataStructure
, java.lang.Iterable<T>
, Lockable
, Notifiable
, java.util.Queue<T>
public interface DistributedQueue<T> extends java.util.Queue<T>, DistributedDataStructure, Notifiable
Modifier and Type | Method | Description |
---|---|---|
void |
clear() |
Removes all of the elements from this collection (optional operation).
|
void |
copyTo(T[] array,
int arrayIndex) |
Copies the Queue elements to the specified array, starting at the specified index.
|
T |
peek() |
Retrieves, but does not remove, the head of this queue,
or returns
null if this queue is empty. |
java.lang.Object[] |
toArray() |
Returns an array containing all of the elements in this collection.
|
addAll, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray
getKey, getWriteThruOptions, setWriteThruOptions
addChangeListener, removeChangeListener
void clear()
clear
in interface java.util.Collection<T>
java.lang.UnsupportedOperationException
- if the clear
operation
is not supported by this collectionvoid copyTo(T[] array, int arrayIndex)
array
- The destination array of the elements copied from Queue.arrayIndex
- he zero-based index in array at which copying begins.T peek()
null
if this queue is empty.peek
in interface java.util.Queue<T>
null
if this queue is emptyjava.lang.Object[] toArray()
The returned array will be "safe" in that no references to it are maintained by this collection. (In other words, this method must allocate a new array even if this collection is backed by an array). The caller is thus free to modify the returned array.
This method acts as bridge between array-based and collection-based APIs.
toArray
in interface java.util.Collection<T>