synchronization of RandomAccessFile with underlying device
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Thursday, June 20, 2002 08:05 AM

Greetings, there is a new introduced mode type in the constructor of RandomAccessFile since j2sdk 1.4. Setting mode to "rwd" or "rws" should ensure that data is written to disk before any write returns (that is what I understand). In versions prior 1.4 this could be done only with filehandle.sync() (as far as I know). I have discovered that I can write more than 10000 Integer/sec with the mode set to "rwd" but only 25/sec with filehandle.sync() . Now the question: Is it for sure that both ensure the same, that data is written to disk? And if both ensure the same how come this incredible difference? Regards Frank-Ol   More>>

Greetings,

there is a new introduced mode type in the constructor of RandomAccessFile since j2sdk 1.4. Setting mode to "rwd" or "rws" should ensure that data is written to disk before any write returns (that is what I understand).

In versions prior 1.4 this could be done only with filehandle.sync() (as far as I know).

I have discovered that I can write more than 10000 Integer/sec with the mode set to "rwd" but only 25/sec with filehandle.sync() .

Now the question: Is it for sure that both ensure the same, that data is written to disk? And if both ensure the same how come this incredible difference?


Regards

Frank-Olaf Lohmann

   <<Less
About | Sitemap | Contact