List of usage examples for org.apache.lucene.store MMapDirectory listAll
@Override
public String[] listAll() throws IOException
From source file:org.elasticsearch.index.store.fs.DefaultFsDirectoryService.java
License:Apache License
@Override protected Directory newFSDirectory(File location, LockFactory lockFactory) throws IOException { final MMapDirectory mmapDir = new MMapDirectory(location, lockFactory); return new FileSwitchDirectory(PRIMARY_EXTENSIONS, mmapDir, new NIOFSDirectory(location, lockFactory), true) {/* w w w . j a v a 2s. c om*/ @Override public String[] listAll() throws IOException { // Avoid doing listAll twice: return mmapDir.listAll(); } }; }
From source file:org.elasticsearch.index.store.FsDirectoryService.java
License:Apache License
private Directory newDefaultDir(Path location, final MMapDirectory mmapDir, LockFactory lockFactory) throws IOException { return new FileSwitchDirectory(PRIMARY_EXTENSIONS, mmapDir, new NIOFSDirectory(location, lockFactory), true) {/*from www . j a v a 2s. c o m*/ @Override public String[] listAll() throws IOException { // Avoid doing listAll twice: return mmapDir.listAll(); } }; }