use of xerial.larray.mmap.MMapMode in project pinot by linkedin.
the class PinotLByteBuffer method mapFromFileInternal.
private static MMapBuffer mapFromFileInternal(File file, long start, long length, FileChannel.MapMode openMode, String context) throws IOException {
MMapMode mmapMode = (openMode == FileChannel.MapMode.READ_ONLY) ? MMapMode.READ_ONLY : MMapMode.READ_WRITE;
// TODO: add memory tracking MMapUtils
MMapBuffer buf = new MMapBuffer(file, start, length, mmapMode);
return buf;
}
Aggregations