I'm developing a program that read from text file line by line and for each line it create a new thread for it and insert the record into database
ThreadPoolExecutor executer = (ThreadPoolExecutor) Executors.newFixedThreadPool(threadPoolSize);
My question is how i can control the insertion of the records?? since I have two types of records insert or update and in the text file i want it to move in sequance not randomly.
so,how i can control the threadpool???