KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > components > thread > LinkedQueue


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.cocoon.components.thread;
17
18 /**
19  * A linked list based channel implementation. The algorithm avoids contention
20  * between puts and takes when the queue is not empty. Normally a put and a
21  * take can proceed simultaneously. (Although it does not allow multiple
22  * concurrent puts or takes.) This class tends to perform more efficently than
23  * other Queue implementations in producer/consumer applications.
24  *
25  * <p>
26  * [<a
27  * HREF="http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html">
28  * Introduction to this package. </a>]
29  * </p>
30  */

31 public class LinkedQueue
32     extends EDU.oswego.cs.dl.util.concurrent.LinkedQueue
33     implements Queue
34 {
35     //~ Methods ----------------------------------------------------------------
36

37     /**
38      * @see org.apache.cocoon.components.thread.Queue#getQueueSize()
39      */

40     public int getQueueSize( )
41     {
42         return -1;
43     }
44 }
45
Popular Tags