org.apache.synapse.commons.executors

## Interface InternalQueue<E>

- Type Parameters:
    `E` -
  All Superinterfaces:
    java.util.Collection<E>, java.lang.Iterable<E>, java.util.Queue<E>
  All Known Implementing Classes:
    FixedSizeQueue, UnboundedQueue

      public interface InternalQueue<E>
      extends java.util.Queue<E>

  Interface implemented by the internal queues.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `drainTo(java.util.Collection<? super E> c)` Drain items from this queue to the specified collection
    `int` | `drainTo(java.util.Collection<? super E> c, int maxElements)` Drain items from this queue to the specified collection
    `int` | `getCapacity()` Return the capacity of the queue
    `java.util.concurrent.locks.Condition` | `getNotFullCond()` Get not full condition
    `int` | `getPriority()` Get the Priority of the queue
    `int` | `remainingCapacity()` Remaining capacity of the queue.
    `void` | `setNotFullCond(java.util.concurrent.locks.Condition condition)` Get not full condition
    `void` | `setPriority(int p)` Set the priority

    - ### Methods inherited from interface java.util.Queue

      `add, element, offer, peek, poll, remove`

    - ### Methods inherited from interface java.util.Collection

      `addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray`

    - ### Methods inherited from interface java.lang.Iterable

      `forEach`

- - ### Method Detail

    - #### getPriority

          int getPriority()

      Get the Priority of the queue
      Returns:
        priority

    - #### setPriority

          void setPriority(int p)

      Set the priority
      Parameters:
        `p` - priority

    - #### getNotFullCond

          java.util.concurrent.locks.Condition getNotFullCond()

      Get not full condition
      Returns:
        not full condition

    - #### setNotFullCond

          void setNotFullCond(java.util.concurrent.locks.Condition condition)

      Get not full condition
      Parameters:
        `condition` - condition

    - #### drainTo

          int drainTo(java.util.Collection<? super E> c)

      Drain items from this queue to the specified collection
      Parameters:
        `c` - collection to add item
      Returns:
        number of items added

    - #### drainTo

          int drainTo(java.util.Collection<? super E> c,
                      int maxElements)

      Drain items from this queue to the specified collection
      Parameters:
        `c` - collection to add item
        `maxElements` - maximum number of element to drain
      Returns:
        number of items added

    - #### remainingCapacity

          int remainingCapacity()

      Remaining capacity of the queue. Unbounded queues should return Integer.MAX_VALUE
      Returns:
        remaining capacity

    - #### getCapacity

          int getCapacity()

      Return the capacity of the queue
      Returns:
        capacity of thr queue

Copyright © 2005-2020 Apache Software Foundation. All Rights Reserved.