org.apache.tomcat.util.net

Class AprEndpoint.WorkerStack

public class AprEndpoint.WorkerStack extends Object

Field Summary
protected intend
protected AprEndpoint.Worker[]workers
Constructor Summary
WorkerStack(int size)
Method Summary
booleanisEmpty()
Is the queue empty?
AprEndpoint.Workerpeek()
Get the first object out of the queue, Return null if the queue is empty.
AprEndpoint.Workerpop()
Get the first object out of the queue.
voidpush(AprEndpoint.Worker worker)
Put the object into the queue.
voidresize(int newSize)
Resize the queue.
intsize()
How many elements are there in this queue?

Field Detail

end

protected int end

workers

protected AprEndpoint.Worker[] workers

Constructor Detail

WorkerStack

public WorkerStack(int size)

Method Detail

isEmpty

public boolean isEmpty()
Is the queue empty?

peek

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

pop

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

push

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

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

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

size

public int size()
How many elements are there in this queue?
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.