Permalink
Browse files

Added method to pause just the receive side of a queue.

  • Loading branch information...
1 parent f57869e commit d2d9836b7aa552b3e346435c69cee077270e0932 Jeff Clites committed with Aug 1, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/main/scala/com/twitter/grabbyhands/Queue.scala
@@ -57,7 +57,7 @@ protected case class Queue(grabbyHands: GrabbyHands, config: ConfigQueue) {
}
connections.foreach(connection => connection.started())
- log.fine("queueu " + name + " all connection threads running")
+ log.fine("queue " + name + " all connection threads running")
def getCounters(): QueueCounters = {
counters
@@ -76,6 +76,10 @@ protected case class Queue(grabbyHands: GrabbyHands, config: ConfigQueue) {
connections.foreach(_.pause)
}
+ def pauseReceive() {
+ connections.filter(_.isInstanceOf[ConnectionRecv]).foreach(_.pause)
+ }
+
def resume() {
connections.foreach(_.unPause)
}

0 comments on commit d2d9836

Please sign in to comment.