Yes, I knew. If I synchronized on a single RAF, I locked all the record. But I didn't see how a record based locking could be achieved. For update, delete, with lockCookie, it is ok to allow multiple threads to change data file at the same time. However, how do you handle create() method? Let's same there is one thread is creating a new record at the end of data file. Before it writes out all the bytes. There is another thread coming in for update() method. At that moment, your new RAF in update() method will open a partially completed file. I am not sure if RAF could handle this thing. Also as I mentioned before, you may need to keep a counter for all the opening RAF to limit the total number of file handler.