This project has retired. For details please refer to its
Attic page .
LinkedQueue (Cocoon API 2.1.12-dev [March 20 2012])
org.apache.cocoon.components.thread
Class LinkedQueue
java.lang.Object
EDU.oswego.cs.dl.util.concurrent.LinkedQueue
org.apache.cocoon.components.thread.LinkedQueue
All Implemented Interfaces: EDU.oswego.cs.dl.util.concurrent.Channel, EDU.oswego.cs.dl.util.concurrent.Puttable, EDU.oswego.cs.dl.util.concurrent.Takable, Queue
public class LinkedQueue extends EDU.oswego.cs.dl.util.concurrent.LinkedQueueimplements Queue
A linked list based channel implementation. The algorithm avoids contention
between puts and takes when the queue is not empty. Normally a put and a
take can proceed simultaneously. (Although it does not allow multiple
concurrent puts or takes.) This class tends to perform more efficently than
other Queue implementations in producer/consumer applications.
[
Introduction to this package. ]
Fields inherited from class EDU.oswego.cs.dl.util.concurrent.LinkedQueue
head_, last_, putLock_, waitingForTake_
Method Summary
int
getQueueSize ()
get the current queue size
Methods inherited from class EDU.oswego.cs.dl.util.concurrent.LinkedQueue
extract, insert, isEmpty, offer, peek, poll, put, 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
LinkedQueue
public LinkedQueue ()
getQueueSize
public int getQueueSize ()
Description copied from interface: Queue
get the current queue size
Specified by: getQueueSize
in interface Queue
Returns: current size of queue. If the size of the queue is not
maintained by an implementation -1 should be returned. See Also: Queue.getQueueSize()
Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.