Class RAFDirectory

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    public class RAFDirectory
    extends FSDirectory
    A straightforward implementation of FSDirectory using However, this class has poor concurrent performance (multiple threads will bottleneck) as it synchronizes when multiple threads read from the same file. It's usually better to use NIOFSDirectory or MMapDirectory instead.

    NOTE: Because this uses RandomAccessFile, it will generally not work with non-default filesystem providers. It is only provided for applications that relied on the fact that RandomAccessFile's IO was not interruptible.