Class GridLuceneDirectory
- java.lang.Object
-
- org.apache.lucene.store.Directory
-
- org.apache.lucene.store.BaseDirectory
-
- org.apache.ignite.internal.processors.query.h2.opt.GridLuceneDirectory
-
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.lucene.util.Accountable
public class GridLuceneDirectory extends org.apache.lucene.store.BaseDirectory implements org.apache.lucene.util.AccountableA memory-residentDirectoryimplementation.
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,GridLuceneFile>fileMapprotected AtomicIntegernextTmpFileIndexprotected Set<String>pendingDeletionsprotected AtomicLongsizeInBytes
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()org.apache.lucene.store.IndexOutputcreateOutput(String name, org.apache.lucene.store.IOContext context)org.apache.lucene.store.IndexOutputcreateTempOutput(String prefix, String suffix, org.apache.lucene.store.IOContext ctx)voiddeleteFile(String name)longfileLength(String name)Collection<org.apache.lucene.util.Accountable>getChildResources()Set<String>getPendingDeletions()String[]listAll()org.apache.lucene.store.IndexInputopenInput(String name, org.apache.lucene.store.IOContext context)longramBytesUsed()voidrename(String source, String dest)voidsync(Collection<String> names)voidsyncMetaData()
-
-
-
Field Detail
-
fileMap
protected final Map<String,GridLuceneFile> fileMap
-
sizeInBytes
protected final AtomicLong sizeInBytes
-
nextTmpFileIndex
protected final AtomicInteger nextTmpFileIndex
-
-
Method Detail
-
listAll
public final String[] listAll()
- Specified by:
listAllin classorg.apache.lucene.store.Directory
-
rename
public void rename(String source, String dest) throws IOException
- Specified by:
renamein classorg.apache.lucene.store.Directory- Throws:
IOException
-
syncMetaData
public void syncMetaData() throws IOException- Specified by:
syncMetaDatain classorg.apache.lucene.store.Directory- Throws:
IOException
-
createTempOutput
public org.apache.lucene.store.IndexOutput createTempOutput(String prefix, String suffix, org.apache.lucene.store.IOContext ctx) throws IOException
- Specified by:
createTempOutputin classorg.apache.lucene.store.Directory- Throws:
IOException
-
fileLength
public final long fileLength(String name) throws IOException
- Specified by:
fileLengthin classorg.apache.lucene.store.Directory- Throws:
IOException
-
deleteFile
public void deleteFile(String name) throws IOException
- Specified by:
deleteFilein classorg.apache.lucene.store.Directory- Throws:
IOException
-
createOutput
public org.apache.lucene.store.IndexOutput createOutput(String name, org.apache.lucene.store.IOContext context) throws IOException
- Specified by:
createOutputin classorg.apache.lucene.store.Directory- Throws:
IOException
-
sync
public void sync(Collection<String> names) throws IOException
- Specified by:
syncin classorg.apache.lucene.store.Directory- Throws:
IOException
-
openInput
public org.apache.lucene.store.IndexInput openInput(String name, org.apache.lucene.store.IOContext context) throws IOException
- Specified by:
openInputin classorg.apache.lucene.store.Directory- Throws:
IOException
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classorg.apache.lucene.store.Directory
-
getPendingDeletions
public Set<String> getPendingDeletions() throws IOException
- Specified by:
getPendingDeletionsin classorg.apache.lucene.store.Directory- Throws:
IOException
-
ramBytesUsed
public long ramBytesUsed()
- Specified by:
ramBytesUsedin interfaceorg.apache.lucene.util.Accountable
-
getChildResources
public Collection<org.apache.lucene.util.Accountable> getChildResources()
- Specified by:
getChildResourcesin interfaceorg.apache.lucene.util.Accountable
-
-