public class

SimpleFSDirectory

extends FSDirectory
java.lang.Object
   ↳ org.apache.lucene.store.Directory
     ↳ org.apache.lucene.store.FSDirectory
       ↳ org.apache.lucene.store.SimpleFSDirectory

Class Overview

A straightforward implementation of 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.

Summary

Nested Classes
class SimpleFSDirectory.SimpleFSIndexInput  
class SimpleFSDirectory.SimpleFSIndexOutput  
[Expand]
Inherited Fields
From class org.apache.lucene.store.FSDirectory
From class org.apache.lucene.store.Directory
Public Constructors
SimpleFSDirectory(File path, LockFactory lockFactory)
Create a new SimpleFSDirectory for the named location.
SimpleFSDirectory(File path)
Create a new SimpleFSDirectory for the named location and NativeFSLockFactory.
Public Methods
IndexOutput createOutput(String name)
Creates an IndexOutput for the file with the given name.
IndexInput openInput(String name, int bufferSize)
Creates an IndexInput for the file with the given name.
[Expand]
Inherited Methods
From class org.apache.lucene.store.FSDirectory
From class org.apache.lucene.store.Directory
From class java.lang.Object
From interface java.io.Closeable

Public Constructors

public SimpleFSDirectory (File path, LockFactory lockFactory)

Create a new SimpleFSDirectory for the named location.

Parameters
path the path of the directory
lockFactory the lock factory to use, or null for the default (NativeFSLockFactory);
Throws
IOException

public SimpleFSDirectory (File path)

Create a new SimpleFSDirectory for the named location and NativeFSLockFactory.

Parameters
path the path of the directory
Throws
IOException

Public Methods

public IndexOutput createOutput (String name)

Creates an IndexOutput for the file with the given name.

Throws
IOException

public IndexInput openInput (String name, int bufferSize)

Creates an IndexInput for the file with the given name.

Throws
IOException