KickJava   Java API By Example, From Geeks To Geeks.

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


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 rendezvous channel, similar to those used in CSP and Ada. Each put must
20  * wait for a take, and vice versa. Synchronous channels are well suited for
21  * handoff designs, in which an object running in one thread must synch up
22  * with an object running in another thread in order to hand it some
23  * information, event, or task.
24  *
25  * <p>
26  * If you only need threads to synch up without exchanging information,
27  * consider using a Barrier. If you need bidirectional exchanges, consider
28  * using a Rendezvous.
29  * </p>
30  *
31  * <p></p>
32  *
33  * <p>
34  * [<a
35  * HREF="http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/intro.html">
36  * Introduction to this package. </a>]
37  * </p>
38  *
39  * @see EDU.oswego.cs.dl.util.concurrent.CyclicBarrier
40  * @see EDU.oswego.cs.dl.util.concurrent.Rendezvous
41  */

42 public class SynchronousChannel
43     extends EDU.oswego.cs.dl.util.concurrent.SynchronousChannel
44     // This is ridiculous, but Queue must be fully qualified to compile in JDK1.3
45
implements org.apache.cocoon.components.thread.Queue
46 {
47     //~ Methods ----------------------------------------------------------------
48

49     /**
50      * @see org.apache.cocoon.components.thread.Queue#getQueueSize()
51      */

52     public int getQueueSize( )
53     {
54         return 0;
55     }
56 }
57
Popular Tags