Thinking some more about it, I find this easier to maintain:

    def enableInterest(ops: Int, connection: ActorRef) =
    new Task {
      def tryRun() {
        val key = childrenKeys(connection.path.name)
        val currentOps = key.interestOps
        val newOps = currentOps | ops
        if (newOps != currentOps) key.interestOps(newOps)
      }
    }

    def disableInterest(ops: Int, connection: ActorRef) =
    new Task {
      def tryRun() {
        val key = childrenKeys(connection.path.name)
        val currentOps = key.interestOps
        val newOps = currentOps & ~ops
        if (newOps != currentOps) key.interestOps(newOps)
      }
    }