public class SimpleFSDirectory extends FSDirectory
FSDirectory
using java.io.RandomAccessFile. 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.| Modifier and Type | Class and Description |
|---|---|
protected static class |
SimpleFSDirectory.SimpleFSIndexInput |
FSDirectory.FSIndexOutputDEFAULT_READ_CHUNK_SIZE, directory, staleFilesisOpen, lockFactory| Constructor and Description |
|---|
SimpleFSDirectory(java.io.File path)
Create a new SimpleFSDirectory for the named location and
NativeFSLockFactory. |
SimpleFSDirectory(java.io.File path,
LockFactory lockFactory)
Create a new SimpleFSDirectory for the named location.
|
| Modifier and Type | Method and Description |
|---|---|
IndexInput |
openInput(java.lang.String name,
int bufferSize)
Creates an IndexInput for the file with the given name.
|
close, createOutput, deleteFile, ensureCanWrite, fileExists, fileLength, fileModified, fileModified, fsync, getDirectory, getFile, getLockID, getReadChunkSize, listAll, listAll, onIndexOutputClosed, open, open, openInput, setLockFactory, setReadChunkSize, sync, sync, toString, touchFileclearLock, copy, copy, ensureOpen, getLockFactory, makeLockpublic SimpleFSDirectory(java.io.File path,
LockFactory lockFactory)
throws java.io.IOException
path - the path of the directorylockFactory - the lock factory to use, or null for the default
(NativeFSLockFactory);java.io.IOExceptionpublic SimpleFSDirectory(java.io.File path)
throws java.io.IOException
NativeFSLockFactory.path - the path of the directoryjava.io.IOExceptionpublic IndexInput openInput(java.lang.String name, int bufferSize) throws java.io.IOException
Copyright © 2000-2022 Apache Software Foundation. All Rights Reserved.