|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.store.Directory
org.apache.lucene.store.FSDirectory
org.apache.lucene.store.NIOFSDirectory
public class NIOFSDirectory
NIO version of FSDirectory. Uses FileChannel.read(ByteBuffer dst, long position) method which allows multiple threads to read from the file without synchronizing. FSDirectory synchronizes in the FSIndexInput.readInternal method which can cause pileups when there are many threads accessing the Directory concurrently. This class only uses FileChannel when reading; writing with an IndexOutput is inherited from FSDirectory. Note: NIOFSDirectory is not recommended on Windows because of a bug in how FileChannel.read is implemented in Sun's JRE. Inside of the implementation the position is apparently synchronized. See here for details: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6265734
FSDirectory
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.lucene.store.FSDirectory |
---|
FSDirectory.FSIndexInput, FSDirectory.FSIndexOutput |
Field Summary |
---|
Fields inherited from class org.apache.lucene.store.FSDirectory |
---|
LOCK_DIR |
Fields inherited from class org.apache.lucene.store.Directory |
---|
lockFactory |
Constructor Summary | |
---|---|
NIOFSDirectory()
|
Method Summary | |
---|---|
IndexInput |
openInput(java.lang.String name,
int bufferSize)
Returns a stream reading an existing file, with the specified read buffer size. |
Methods inherited from class org.apache.lucene.store.FSDirectory |
---|
close, createOutput, deleteFile, fileExists, fileLength, fileModified, fileModified, getDirectory, getDirectory, getDirectory, getDirectory, getDirectory, getDirectory, getDisableLocks, getFile, getLockID, list, openInput, renameFile, setDisableLocks, sync, toString, touchFile |
Methods inherited from class org.apache.lucene.store.Directory |
---|
clearLock, copy, ensureOpen, getLockFactory, makeLock, setLockFactory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NIOFSDirectory()
Method Detail |
---|
public IndexInput openInput(java.lang.String name, int bufferSize) throws java.io.IOException
Directory
FSDirectory
and CompoundFileReader
.
openInput
in class FSDirectory
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |