This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
I have a 50 java threads and each thread will watch 10 stocks in real time. Here all threads should update the data to single HashMap. The data should be updated every second. So that i can take data from the hashmap and use it for further processing. Could you please let me know which is the best way to achieve this?
I know this may be out of subject here, but updating stock data every second..In my opinion its better if you update once in every few milliseconds..
TimeUnit class in JAVA 5+ can be also helpful to you..If you want to go for nanoseconds, microseconds, milliseconds, ...or hours .