Apache Tomcat 7.0.4

org.apache.jasper.util
Class JspQueue<T>

java.lang.Object
  extended by org.apache.jasper.util.JspQueue<T>

public class JspQueue<T>
extends Object

The JspQueue is supposed to hold a set of instances in sorted order. Sorting order is determined by the instances' content. As this content may change during instance lifetime, the Queue must be cheap to update - ideally in constant time. Access to the first element in the queue must happen in constant time. Only a minimal set of operations is implemented.


Constructor Summary
JspQueue()
          Initialize empty queue.
 
Method Summary
 void makeYoungest(Entry<T> candidate)
          Moves the candidate to the front of the queue.
 T pop()
          Removes the head of the queue and returns its content.
 Entry<T> push(T object)
          Adds an object to the end of the queue and returns the entry created for said object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JspQueue

public JspQueue()
Initialize empty queue.

Method Detail

push

public Entry<T> push(T object)
Adds an object to the end of the queue and returns the entry created for said object. The entry can later be reused for moving the entry back to the front of the list.

Parameters:
object - the object to append to the end of the list.
Returns:
a ticket for use when the object should be moved back to the front.

pop

public T pop()
Removes the head of the queue and returns its content.

Returns:
the content of the head of the queue.

makeYoungest

public void makeYoungest(Entry<T> candidate)
Moves the candidate to the front of the queue.

Parameters:
candidate - the entry to move to the front of the queue.

Apache Tomcat 7.0.4

Copyright © 2000-2010 Apache Software Foundation. All Rights Reserved.