Sftp thread for multiple site
I'm new to multithreading. I want to develop code that will read login information from a file (have that part) and use it to Sftp files using the information. The Sftp part is working. In some case I have 60+ sites to sftp files from. It takes 57 secs when this is done in C++. I didn't write the code, so I don't understand it. I want to do them same in Java, but don't know how. My thought is I will develop an SftpThread that will do the work. My main will read the login info into a Map then loop through the map creating a thread for each login entry. Does this sound reasonable? Not sure if I should use "extends Thread" or "implements Runnable". And how many threads are too many? Any advice and/or guidance will be much appreciated. Currently, this is done sequentially and taking over 30 mins to complete. Of course this is unacceptable.