Will using multiple threads with a RandomAccessFile help performance?

后端 未结 7 2122
滥情空心
滥情空心 2020-12-03 16:32

I am working on a (database-ish) project, where data is stored in a flat file. For reading/writing I\'m using the RandomAccessFile class. Will I gain anything f

7条回答
  •  既然无缘
    2020-12-03 16:40

    There is an option to memory map your flat file with NIO. In that case the OS memory manager becomes responsible for moving in-out sections of the file. You can also apply region locks for writers.

提交回复
热议问题