2 //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
4 // Centre for Speech Technology Research \\
5 // University of Edinburgh, UK \\
6 // Copyright (c) 1996,1997 \\
7 // All Rights Reserved. \\
8 // Permission is hereby granted, free of charge, to use and distribute \\
9 // this software and its documentation without restriction, including \\
10 // without limitation the rights to use, copy, modify, merge, publish, \\
11 // distribute, sublicense, and/or sell copies of this work, and to \\
12 // permit persons to whom this work is furnished to do so, subject to \\
13 // the following conditions: \\
14 // 1. The code must retain the above copyright notice, this list of \\
15 // conditions and the following disclaimer. \\
16 // 2. Any modifications must be clearly marked as such. \\
17 // 3. Original authors' names are not deleted. \\
18 // 4. The authors' names are not used to endorse or promote products \\
19 // derived from this software without specific prior written \\
21 // THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK \\
22 // DISCLAIM ALL WARRANTIES With REGARD TO THIS SOFTWARE, INCLUDING \\
23 // ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT \\
24 // SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE \\
25 // FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES \\
26 // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN \\
27 // AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, \\
28 // ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF \\
31 //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
33 // Author: Richard Caley (rjc@cstr.ed.ac.uk) \\
34 // -------------------------------------------------------------------- \\
35 // A thread safe queue based on Vector. Could be faster. \\
37 //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
40 package cstr.festival.client ;
50 public JobQueue(int space)
52 q = new Vector(space);
60 public synchronized void add(Object thing)
65 public synchronized void remove(Object thing)
67 q.removeElement(thing);
70 public synchronized boolean isEmpty()
75 public synchronized Object top()
86 public synchronized Object get()
100 public synchronized Enumeration elements()