public abstract class SegmentInfoFormat
extends
SegmentInfo
(segment metadata file).SegmentInfo
Modifier | Constructor and Description |
---|---|
protected |
SegmentInfoFormat()
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract SegmentInfo |
read(Directory directory,
segmentName,
byte[] segmentID,
IOContext context)
Read
SegmentInfo data from a directory. |
abstract void |
write(Directory dir,
SegmentInfo info,
IOContext ioContext)
Write
SegmentInfo data. |
protected SegmentInfoFormat()
public abstract SegmentInfo read(Directory directory, segmentName, byte[] segmentID, IOContext context) throws
SegmentInfo
data from a directory.directory
- directory to read fromsegmentName
- name of the segment to readsegmentID
- expected identifier for the segment
- If an I/O error occurspublic abstract void write(Directory dir, SegmentInfo info, IOContext ioContext) throws
SegmentInfo
data.
The codec must add its SegmentInfo filename(s) to info
before doing i/o.
- If an I/O error occursCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.