Re: File Read in 2 JVM
- From: "Chris Uppal" <chris.uppal@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 12 Jan 2007 19:36:44 -0000
kingpin+nntp@xxxxxxxxxxxxxxx wrote:
Three possible solutions:
0. Have the reader lock the file so that no other process can write to
it. If you can't get the lock, then it means another process is
writing to it.
1. Have the writer create a secondary status file, which is deleted
once the process has been completed. The java.io.File.deleteOnExit()
method can make this easier.
2. Have the writer create the file with a different name/extension, and
then rename it after closing it.
....also...
3. Have the writer write a unique end-marker to the output file.
-- chris
.
- Follow-Ups:
- Re: File Read in 2 JVM
- From: kingpin+nntp
- Re: File Read in 2 JVM
- References:
- File Read in 2 JVM
- From: moleskyca1
- Re: File Read in 2 JVM
- From: kingpin+nntp
- File Read in 2 JVM
- Prev by Date: Re: Sum of Primes < 1000000
- Next by Date: Re: Why aren't long & double's atomic?
- Previous by thread: Re: File Read in 2 JVM
- Next by thread: Re: File Read in 2 JVM
- Index(es):
Relevant Pages
|