ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/util/uk/org/iscream/cms/util/Queue.java
(Generate patch)

Comparing projects/cms/source/util/uk/org/iscream/cms/util/Queue.java (file contents):
Revision 1.6 by tdb, Tue Jan 23 18:22:28 2001 UTC vs.
Revision 1.7 by tdb, Tue Jan 30 01:56:28 2001 UTC

# Line 102 | Line 102 | public class Queue {
102                  ((LinkedList) _lists.get(queue)).notifyAll();
103          }
104      }
105 +
106 +    /**
107 +     * This method erases the contents of a given queue. This
108 +     * method should be used with care. It can only empty one
109 +     * internal queue, not all of them. This must be called
110 +     * multiple times to empty all queues.
111 +     *
112 +     * @param queue the queue to empty.
113 +     */
114 +    public void clearQueue(int queue) {
115 +        synchronized(this) {
116 +            ((LinkedList) _lists.get(queue)).clear();
117 +        }
118 +    }
119      
120      /**
121       * This method returns a textual status of the queues. It

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines