Interface DistributedQueue<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      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.
      • Methods inherited from interface java.util.Collection

        addAll, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface com.alachisoft.ncache.client.datastructures.Lockable

        lock, unlock
      • Methods inherited from interface java.util.Queue

        add, element, offer, poll, remove
    • Method Detail

      • clear

        void clear()
        Removes all of the elements from this collection (optional operation). The collection will be empty after this method returns.
        Specified by:
        clear in interface java.util.Collection<T>
        Throws:
        java.lang.UnsupportedOperationException - if the clear operation is not supported by this collection
      • copyTo

        void copyTo​(T[] array,
                    int arrayIndex)
        Copies the Queue elements to the specified array, starting at the specified index.
        Parameters:
        array - The destination array of the elements copied from Queue.
        arrayIndex - he zero-based index in array at which copying begins.
      • peek

        T peek()
        Retrieves, but does not remove, the head of this queue, or returns null if this queue is empty.
        Specified by:
        peek in interface java.util.Queue<T>
        Returns:
        the head of this queue, or null if this queue is empty
      • toArray

        java.lang.Object[] toArray()
        Returns an array containing all of the elements in this collection. If this collection makes any guarantees as to what order its elements are returned by its iterator, this method must return the elements in the same order.

        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.

        Specified by:
        toArray in interface java.util.Collection<T>
        Returns:
        an array containing all of the elements in this collection