01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.apache.cocoon.components.thread;
18:
19: /**
20: * A linked list based channel implementation. The algorithm avoids contention
21: * between puts and takes when the queue is not empty. Normally a put and a
22: * take can proceed simultaneously. (Although it does not allow multiple
23: * concurrent puts or takes.) This class tends to perform more efficently than
24: * other Queue implementations in producer/consumer applications.
25: *
26: * <p>
27: * [<a
28: * href="http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html">
29: * Introduction to this package. </a>]
30: * </p>
31: */
32: public class LinkedQueue extends
33: EDU.oswego.cs.dl.util.concurrent.LinkedQueue implements Queue {
34: //~ Methods ----------------------------------------------------------------
35:
36: /**
37: * @see org.apache.cocoon.components.thread.Queue#getQueueSize()
38: */
39: public int getQueueSize() {
40: return -1;
41: }
42: }
|