This project has retired. For details please refer to its
Attic page.
BoundedQueue (Cocoon API 2.1.12-dev [March 20 2012])
org.apache.cocoon.components.thread
Class BoundedQueue
java.lang.Object
EDU.oswego.cs.dl.util.concurrent.BoundedBuffer
org.apache.cocoon.components.thread.BoundedQueue
- All Implemented Interfaces:
- EDU.oswego.cs.dl.util.concurrent.BoundedChannel, EDU.oswego.cs.dl.util.concurrent.Channel, EDU.oswego.cs.dl.util.concurrent.Puttable, EDU.oswego.cs.dl.util.concurrent.Takable, Queue
public class BoundedQueue
- extends EDU.oswego.cs.dl.util.concurrent.BoundedBuffer
- implements Queue
Efficient array-based bounded buffer class. Adapted from CPJ, chapter 8,
which describes design.
[
Introduction to this package. ]
Fields inherited from class EDU.oswego.cs.dl.util.concurrent.BoundedBuffer |
array_, emptySlots_, putMonitor_, putPtr_, takePtr_, usedSlots_ |
Constructor Summary |
BoundedQueue()
Create a buffer with the current default capacity |
BoundedQueue(int capacity)
Create a BoundedQueue with the given capacity. |
Methods inherited from class EDU.oswego.cs.dl.util.concurrent.BoundedBuffer |
capacity, extract, incEmptySlots, incUsedSlots, insert, offer, peek, poll, put, size, take |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface EDU.oswego.cs.dl.util.concurrent.Channel |
offer, peek, poll, put, take |
BoundedQueue
public BoundedQueue()
- Create a buffer with the current default capacity
BoundedQueue
public BoundedQueue(int capacity)
throws IllegalArgumentException
- Create a BoundedQueue with the given capacity.
- Parameters:
capacity
- The capacity
- Throws:
IllegalArgumentException
- if capacity less or equal to zero
getQueueSize
public int getQueueSize()
- DOCUMENT ME!
- Specified by:
getQueueSize
in interface Queue
- Returns:
- current size of queue.
Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.