Apache Tomcat 6.0.43

org.apache.tomcat.util.net
Class NioEndpoint.WorkerStack

java.lang.Object
  extended by org.apache.tomcat.util.net.NioEndpoint.WorkerStack
Enclosing class:
NioEndpoint

public class NioEndpoint.WorkerStack
extends java.lang.Object


Field Summary
protected  int end
           
protected  NioEndpoint.Worker[] workers
           
 
Constructor Summary
NioEndpoint.WorkerStack(int size)
           
 
Method Summary
 boolean isEmpty()
          Is the queue empty?
 NioEndpoint.Worker peek()
          Get the first object out of the queue, Return null if the queue is empty.
 NioEndpoint.Worker pop()
          Get the first object out of the queue.
 void push(NioEndpoint.Worker worker)
          Put the worker into the queue.
 void resize(int newSize)
          Resize the queue.
 int size()
          How many elements are there in this queue?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

workers

protected NioEndpoint.Worker[] workers

end

protected int end
Constructor Detail

NioEndpoint.WorkerStack

public NioEndpoint.WorkerStack(int size)
Method Detail

push

public void push(NioEndpoint.Worker worker)
Put the worker into the queue. If the queue is full (for example if the queue has been reduced in size) the worker will be dropped.

Parameters:
worker - the worker to be appended to the queue (first element).

pop

public NioEndpoint.Worker pop()
Get the first object out of the queue. Return null if the queue is empty.


peek

public NioEndpoint.Worker peek()
Get the first object out of the queue, Return null if the queue is empty.


isEmpty

public boolean isEmpty()
Is the queue empty?


size

public int size()
How many elements are there in this queue?


resize

public void resize(int newSize)
Resize the queue. If there are too many objects in the queue for the new size, drop the excess.

Parameters:
newSize -

Apache Tomcat 6.0.43

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