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

Comparing projects/cms/source/util/uk/org/iscream/cms/util/QueueMonitor.java (file contents):
Revision 1.4 by tdb, Wed Feb 28 19:02:22 2001 UTC vs.
Revision 1.6 by tdb, Tue Mar 13 02:19:49 2001 UTC

# Line 34 | Line 34 | class QueueMonitor extends Thread {
34       * @param name A name to identify the source Queue with
35       */
36      public QueueMonitor (Queue sourceQueue, Queue destQueue, long interval, String name) {
37 +        // set the Thread name
38 +        setName("util.QueueMonitor");
39 +        
40          _sourceQueue = sourceQueue;
41          _destQueue = destQueue;
42          _interval = interval;
# Line 71 | Line 74 | class QueueMonitor extends Thread {
74      public void shutdown() {
75          // this will stop the main loop
76          _run = false;
77 +        // get a hash of our Queue (for identification)
78 +        String hashCode = String.valueOf(_sourceQueue.hashCode());
79          // create some XML
80          String date = new Long(System.currentTimeMillis()/((long) 1000)).toString();
81 <        String xml = "<packet type=\"queueStat\" date=\""+date+"\" name=\""+_srcName+"\" shutdown=\"true\"></packet>";
81 >        String xml = "<packet type=\"queueStat\" date=\""+date+"\" name=\""+_srcName+"\" hashCode=\""+hashCode+"\" shutdown=\"true\"></packet>";
82          // write XML to destination Queue
83          _destQueue.add(xml);
84      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines