|
Knopflerfish OSGi 1.3.4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractList
|
+--java.util.Vector
|
+--org.knopflerfish.util.Queue
The Queue class represents a first-in-first-out (FIFO) queue
of objects.
| Field Summary |
| Fields inherited from class java.util.Vector |
capacityIncrement, elementCount, elementData |
| Fields inherited from class java.util.AbstractList |
modCount |
| Constructor Summary | |
Queue(int size)
* Constructs an Queue with the specifies maximum size. * * |
|
| Method Summary | |
void |
close()
* Closes the queue, i.e. wakes up all threads blocking on * a call to remove(). |
void |
insert(java.lang.Object item)
* Inserts an item into the queue. |
void |
insertFirst(java.lang.Object item)
* Inserts an item first into the queue. |
java.lang.Object |
remove()
* Removes and returns the first object in the queue. * Same as remove(float timeout) but this function * blocks forever. * * |
java.lang.Object |
removeWait(float timeout)
* Removes and returns the first item in the queue. * If the queue is empty, the calling thread will block. * * |
| Methods inherited from class java.util.Vector |
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize |
| Methods inherited from class java.util.AbstractList |
iterator, listIterator, listIterator |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
iterator, listIterator, listIterator |
| Constructor Detail |
public Queue(int size)
size - maximum queue size.| Method Detail |
public void insert(java.lang.Object item)
throws java.lang.IndexOutOfBoundsException
remove, one of them is unblocked. * *
item - the item to be inserted. *
java.lang.IndexOutOfBoundsException - if maximum queue size is reached.public void insertFirst(java.lang.Object item)
remove, one of them is unblocked. * *
item - the item to be inserted.public java.lang.Object removeWait(float timeout)
timeout - timeout in seconds. *
null if a *
timeout occurred. To distinguish timeouts, null *
items should not be inserted in the queue.public java.lang.Object remove()
remove(float timeout) but this function * blocks forever. * *
public void close()
|
Knopflerfish OSGi 1.3.4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||