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 rendezvous channel, similar to those used in CSP and Ada. Each put must
21: * wait for a take, and vice versa. Synchronous channels are well suited for
22: * handoff designs, in which an object running in one thread must synch up
23: * with an object running in another thread in order to hand it some
24: * information, event, or task.
25: *
26: * <p>
27: * If you only need threads to synch up without exchanging information,
28: * consider using a Barrier. If you need bidirectional exchanges, consider
29: * using a Rendezvous.
30: * </p>
31: *
32: * <p></p>
33: *
34: * <p>
35: * [<a
36: * href="http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html">
37: * Introduction to this package. </a>]
38: * </p>
39: *
40: * @see EDU.oswego.cs.dl.util.concurrent.CyclicBarrier
41: * @see EDU.oswego.cs.dl.util.concurrent.Rendezvous
42: */
43: public class SynchronousChannel extends
44: EDU.oswego.cs.dl.util.concurrent.SynchronousChannel
45: // This is ridiculous, but Queue must be fully qualified to compile in JDK1.3
46: implements org.apache.cocoon.components.thread.Queue {
47: //~ Methods ----------------------------------------------------------------
48:
49: /**
50: * @see org.apache.cocoon.components.thread.Queue#getQueueSize()
51: */
52: public int getQueueSize() {
53: return 0;
54: }
55: }
|