I am using nio, and using a RandomAccessFile to get a FileChannel, and mapped the data section of database into buffer using the FileChannel. I updata the data successfully, my question is when to force() the buffer? In addition, I found even if I didn't use force() method, after I closed the channel and randomaccessfile, the data was writen to harddisk automatically. why?
I think all the data should be force() only once, before the shut off of server. During the running period of server, all the operation is on the buffer.
need your comment, thank you.
Regards,
Damu