org.apache.catalina.util
Class Queue
public
class
Queue
extends Object
A simple FIFO queue class which causes the calling thread to wait
if the queue is empty and notifies threads that are waiting when it
is not empty.
Author: Anil V (akv@eng.sun.com)
Method Summary |
Object | get()
Get the first object out of the queue. |
boolean | isEmpty()
Is the queue empty? |
Object | peek()
Peek to see if something is available. |
Object | pull()
Pull the first object out of the queue. |
void | put(Object object)
Put the object into the queue.
|
int | size()
How many elements are there in this queue? |
public Object get()
Get the first object out of the queue. Return null if the queue
is empty.
public boolean isEmpty()
Is the queue empty?
public Object peek()
Peek to see if something is available.
public Object pull()
Pull the first object out of the queue. Wait if the queue is
empty.
public void put(Object object)
Put the object into the queue.
Parameters: object the object to be appended to the
queue.
public int size()
How many elements are there in this queue?
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.