activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1023990 - /activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/perf/StompRemoteClients.scala
Date Mon, 18 Oct 2010 20:25:39 GMT
Author: chirino
Date: Mon Oct 18 20:25:38 2010
New Revision: 1023990

URL: http://svn.apache.org/viewvc?rev=1023990&view=rev
Log:
Rip out watchdog code, isn't used/needed

Modified:
    activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/perf/StompRemoteClients.scala

Modified: activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/perf/StompRemoteClients.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/perf/StompRemoteClients.scala?rev=1023990&r1=1023989&r2=1023990&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/perf/StompRemoteClients.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-stomp/src/test/scala/org/apache/activemq/apollo/stomp/perf/StompRemoteClients.scala
Mon Oct 18 20:25:38 2010
@@ -33,18 +33,6 @@ import _root_.org.fusesource.hawtdispatc
 class StompRemoteConsumer extends RemoteConsumer with Logging {
   var outboundSink: OverflowSink[StompFrame] = null
 
-  def watchdog(lastMessageCount: Int) : Unit = {
-    val seconds = 10
-    dispatchQueue.dispatchAfter(seconds, TimeUnit.SECONDS, ^ {
-          if (messageCount == lastMessageCount) {
-            warn("Messages have stopped arriving after " + seconds + "s, stopping consumer")
-            stop
-          } else {
-            watchdog(messageCount)
-          }
-        })
-  }
-
   def onConnected() = {
     outboundSink = new OverflowSink[StompFrame](MapSink(transportSink){ x=>x })
     outboundSink.refiller = ^{}
@@ -68,7 +56,6 @@ class StompRemoteConsumer extends Remote
 
     frame = StompFrame(SUBSCRIBE, headers);
     outboundSink.offer(frame);
-    watchdog(messageCount)
   }
 
   override def onTransportCommand(command: Object) = {
@@ -185,30 +172,3 @@ class StompRemoteProducer extends Remote
   }
 }
 
-trait Watchog extends RemoteConsumer {
-  var messageCount = 0
-
-  def watchdog(lastMessageCount: Int): Unit = {
-    val seconds = 10
-    dispatchQueue.dispatchAfter(seconds, TimeUnit.SECONDS, ^ {
-      if (messageCount == lastMessageCount) {
-        warn("Messages have stopped arriving after " + seconds + "s, stopping consumer")
-        stop
-      } else {
-        watchdog(messageCount)
-      }
-    })
-  }
-
-  abstract override protected def messageReceived() = {
-    super.messageReceived
-    messageCount += 1
-  }
-
-  abstract override protected def onConnected() = {
-    super.onConnected
-    watchdog(messageCount)
-  }
-
-}
-



Mime
View raw message