public class GridLuceneDirectory
extends org.apache.lucene.store.Directory
Directory implementation.| Modifier and Type | Field and Description |
|---|---|
protected Map<String,GridLuceneFile> |
fileMap |
protected AtomicLong |
sizeInBytes |
| Constructor and Description |
|---|
GridLuceneDirectory(org.gridgain.grid.util.offheap.unsafe.GridUnsafeMemory mem)
Constructs an empty
Directory. |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
org.apache.lucene.store.IndexOutput |
createOutput(String name) |
void |
deleteFile(String name) |
boolean |
fileExists(String name) |
long |
fileLength(String name) |
long |
fileModified(String name) |
String[] |
listAll() |
protected GridLuceneFile |
newRAMFile()
Returns a new
GridLuceneFile for storing data. |
org.apache.lucene.store.IndexInput |
openInput(String name) |
void |
touchFile(String name)
Set the modified time of an existing file to now.
|
protected final Map<String,GridLuceneFile> fileMap
protected final AtomicLong sizeInBytes
public GridLuceneDirectory(org.gridgain.grid.util.offheap.unsafe.GridUnsafeMemory mem)
Directory.mem - Memory.public final String[] listAll()
listAll in class org.apache.lucene.store.Directorypublic final boolean fileExists(String name)
fileExists in class org.apache.lucene.store.Directorypublic final long fileModified(String name)
fileModified in class org.apache.lucene.store.Directorypublic void touchFile(String name) throws IOException
touchFile in class org.apache.lucene.store.DirectoryIOException - if the file does not existpublic final long fileLength(String name) throws IOException
fileLength in class org.apache.lucene.store.DirectoryIOExceptionpublic void deleteFile(String name) throws IOException
deleteFile in class org.apache.lucene.store.DirectoryIOExceptionpublic org.apache.lucene.store.IndexOutput createOutput(String name) throws IOException
createOutput in class org.apache.lucene.store.DirectoryIOExceptionprotected GridLuceneFile newRAMFile()
GridLuceneFile for storing data. This method can be
overridden to return different GridLuceneFile impls, that e.g. override.public org.apache.lucene.store.IndexInput openInput(String name) throws IOException
openInput in class org.apache.lucene.store.DirectoryIOExceptionpublic void close()
close in interface Closeableclose in interface AutoCloseableclose in class org.apache.lucene.store.DirectoryCopyright © 2014. All rights reserved.