tigase.util

## Class PriorityQueueRelaxed<E>

- java.lang.Object
- - tigase.util.PriorityQueueAbstract<E>
  - - tigase.util.PriorityQueueRelaxed<E>

- Type Parameters:
    `E` -

      public class PriorityQueueRelaxed<E>
      extends PriorityQueueAbstract<E>

  Created: Feb 9, 2010 11:12:56 AM
  Version:
    $Rev$
  Author:
    Artur Hefczyc

- - ### Field Summary

    - ### Fields inherited from class tigase.util.PriorityQueueAbstract

      `NONPRIORITY_QUEUE, QUEUE_IMPLEMENTATION`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `` | `PriorityQueueRelaxed()` Constructs ...
    `protected` | `PriorityQueueRelaxed(int maxPriority, int maxSize)` Constructs ...

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `init(int maxPriority, int maxSize)` Method description
    `boolean` | `offer(E element, int priority)` Method description
    `void` | `put(E element, int priority)` Method description
    `void` | `setMaxSize(int maxSize)` Method description
    `int[]` | `size()` Method description
    `E` | `take()` Method description
    `int` | `totalSize()` Method description

    - ### Methods inherited from class tigase.util.PriorityQueueAbstract

      `getPriorityQueue`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PriorityQueueRelaxed

          public PriorityQueueRelaxed()

      Constructs ...

    - #### PriorityQueueRelaxed

          protected PriorityQueueRelaxed(int maxPriority,
                              int maxSize)

      Constructs ...
      Parameters:
        `maxPriority` -
        `maxSize` -

  - ### Method Detail

    - #### init

          public final void init(int maxPriority,
                  int maxSize)

      Method description
      Specified by:
        `init` in class `PriorityQueueAbstract<E>`
      Parameters:
        `maxPriority` -
        `maxSize` -

    - #### offer

          public boolean offer(E element,
                      int priority)

      Method description
      Specified by:
        `offer` in class `PriorityQueueAbstract<E>`
      Parameters:
        `element` -
        `priority` -
      Returns:

    - #### put

          public void put(E element,
                 int priority)
                   throws InterruptedException

      Method description
      Specified by:
        `put` in class `PriorityQueueAbstract<E>`
      Parameters:
        `element` -
        `priority` -
      Throws:
        `InterruptedException`

    - #### setMaxSize

          public void setMaxSize(int maxSize)

      Method description
      Specified by:
        `setMaxSize` in class `PriorityQueueAbstract<E>`
      Parameters:
        `maxSize` -

    - #### size

          public int[] size()

      Method description
      Specified by:
        `size` in class `PriorityQueueAbstract<E>`
      Returns:

    - #### take

          public E take()
                 throws InterruptedException

      Method description
      Specified by:
        `take` in class `PriorityQueueAbstract<E>`
      Returns:
      Throws:
        `InterruptedException`

    - #### totalSize

          public int totalSize()

      Method description
      Specified by:
        `totalSize` in class `PriorityQueueAbstract<E>`
      Returns:

Copyright © 2013 Tigase. All rights reserved.