Package org.apache.lucene.codecs
Class CompoundFormat
- java.lang.Object
-
- org.apache.lucene.codecs.CompoundFormat
-
- Direct Known Subclasses:
Lucene90CompoundFormat
public abstract class CompoundFormat extends Object
Encodes/decodes compound files- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CompoundFormat()
Sole constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract CompoundDirectory
getCompoundReader(Directory dir, SegmentInfo si, IOContext context)
Returns a Directory view (read-only) for the compound files in this segmentabstract void
write(Directory dir, SegmentInfo si, IOContext context)
Packs the provided segment's files into a compound format.
-
-
-
Method Detail
-
getCompoundReader
public abstract CompoundDirectory getCompoundReader(Directory dir, SegmentInfo si, IOContext context) throws IOException
Returns a Directory view (read-only) for the compound files in this segment- Throws:
IOException
-
write
public abstract void write(Directory dir, SegmentInfo si, IOContext context) throws IOException
Packs the provided segment's files into a compound format. All files referenced by the providedSegmentInfo
must haveCodecUtil.writeIndexHeader(org.apache.lucene.store.DataOutput, java.lang.String, int, byte[], java.lang.String)
andCodecUtil.writeFooter(org.apache.lucene.store.IndexOutput)
.- Throws:
IOException
-
-