upload file simultaneously

Hi guys,

I have assigned a task to upload chunk of files simultaneously in different folder. So I guess java executor concurrency is the best choice. ... correct me if this is wrong. For instance, the first thread start, it scan thru the directies and get all the files info. then it start locking the first file in the list. the second thread also doing the same thing but once it try to lock the file but the file is already locked, it will perform a lock again for the 2nd file in it list. ... same for 3rd, 4th 5th ...thread. Is this reliable? or anyone know if there's any tools out there can do the same thing?

Thanks & Regards,

Mark

[669 byte] By [kmthiena] at [2007-11-27 11:53:55]
# 1

It's probably reliable enough, but it's O(N squared), which is an issue for large N. Why not have a thread that scans the directory once and starts all the required upload threads?

ejpa at 2007-7-29 18:52:58 > top of Java-index,Core,Core APIs...