Process Synchronization in java -


Process A writes in XYZ, when executed. Processes are B and C, when executed, the file reads XYZ. Therefore, while the process A is above, B and C should wait to complete. Can I use the java.nio package to provide synchronization? Or should I use something like file lock or socket? Can we tell the time to wait for another process to wait?

Edited: The file is created during the first writing process. In such a case, can I make it a shared resource?

Java Eno package can use file lock better solution, I hope but, I think java.nio is not complete up to JDK 1.6.

File lock:

Comments

Popular posts from this blog

php - how to change mysql_result($res, 0, "url"); to mysqli -

Delphi: missing interface declarations for UI Automation methods -

android - How to attach an image from an app to gmail -