tigase.util
Class PriorityQueue<E>

java.lang.Object
  extended by tigase.util.PriorityQueueAbstract<E>
      extended by tigase.util.PriorityQueue<E>
Type Parameters:
E -

public class PriorityQueue<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
 
Constructor Summary
protected PriorityQueue(int maxPriority, int maxSize)
          Constructs ...
 
Method Summary
 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

PriorityQueue

protected PriorityQueue(int maxPriority,
                        int maxSize)
Constructs ...

Parameters:
maxPriority -
maxSize -
Method Detail

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 © 2001-2006 Tigase Developers Team. All rights Reserved.