Renamed getCodecInfo to getSegmentCodecs for consistency

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1034570 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Simon Willnauer 2010-11-12 21:17:23 +00:00
parent 69313c1d47
commit e95fbfd1df
5 changed files with 9 additions and 9 deletions

View File

@ -408,7 +408,7 @@ public class CheckIndex {
SegmentReader reader = null;
try {
final SegmentCodecs codec = info.getCodecInfo();
final SegmentCodecs codec = info.getSegmentCodecs();
msg(" codec=" + codec);
segInfoStat.codec = codec;
msg(" compound=" + info.getUseCompoundFile());

View File

@ -85,7 +85,7 @@ public final class SegmentInfo {
private Map<String,String> diagnostics;
public SegmentInfo(String name, int docCount, Directory dir, boolean isCompoundFile, int docStoreOffset,
String docStoreSegment, boolean docStoreIsCompoundFile, boolean hasProx, SegmentCodecs codecInfo) {
String docStoreSegment, boolean docStoreIsCompoundFile, boolean hasProx, SegmentCodecs segmentCodecs) {
this.name = name;
this.docCount = docCount;
this.dir = dir;
@ -95,7 +95,7 @@ public final class SegmentInfo {
this.docStoreSegment = docStoreSegment;
this.docStoreIsCompoundFile = docStoreIsCompoundFile;
this.hasProx = hasProx;
this.segmentCodecs = codecInfo;
this.segmentCodecs = segmentCodecs;
delCount = 0;
assert docStoreOffset == -1 || docStoreSegment != null: "dso=" + docStoreOffset + " dss=" + docStoreSegment + " docCount=" + docCount;
}
@ -420,7 +420,7 @@ public final class SegmentInfo {
this.segmentCodecs = segmentCodecs;
}
SegmentCodecs getCodecInfo() {
SegmentCodecs getSegmentCodecs() {
return segmentCodecs;
}

View File

@ -308,7 +308,7 @@ public final class SegmentInfos extends Vector<SegmentInfo> {
SegmentInfos sis = (SegmentInfos) super.clone();
for(int i=0;i<sis.size();i++) {
final SegmentInfo info = sis.info(i);
assert info.getCodecInfo() != null;
assert info.getSegmentCodecs() != null;
sis.set(i, (SegmentInfo) info.clone());
}
sis.userData = new HashMap<String,String>(userData);

View File

@ -109,7 +109,7 @@ public class SegmentReader extends IndexReader implements Cloneable {
}
segment = si.name;
final SegmentCodecs codecInfo = si.getCodecInfo();
final SegmentCodecs segmentCodecs = si.getSegmentCodecs();
this.readBufferSize = readBufferSize;
this.dir = dir;
@ -128,7 +128,7 @@ public class SegmentReader extends IndexReader implements Cloneable {
this.termsIndexDivisor = termsIndexDivisor;
// Ask codec for its Fields
fields = codecInfo.codec().fieldsProducer(new SegmentReadState(cfsDir, si, fieldInfos, readBufferSize, termsIndexDivisor));
fields = segmentCodecs.codec().fieldsProducer(new SegmentReadState(cfsDir, si, fieldInfos, readBufferSize, termsIndexDivisor));
assert fields != null;
success = true;

View File

@ -273,7 +273,7 @@ public class TestCodecs extends LuceneTestCase {
final SegmentInfo si = new SegmentInfo(SEGMENT, 10000, dir, false, -1, SEGMENT, false, true, SegmentCodecs.build(fieldInfos, CodecProvider.getDefault()));
si.setHasProx(false);
final FieldsProducer reader = si.getCodecInfo().codec().fieldsProducer(new SegmentReadState(dir, si, fieldInfos, 64, IndexReader.DEFAULT_TERMS_INDEX_DIVISOR));
final FieldsProducer reader = si.getSegmentCodecs().codec().fieldsProducer(new SegmentReadState(dir, si, fieldInfos, 64, IndexReader.DEFAULT_TERMS_INDEX_DIVISOR));
final FieldsEnum fieldsEnum = reader.iterator();
assertNotNull(fieldsEnum.next());
@ -320,7 +320,7 @@ public class TestCodecs extends LuceneTestCase {
this.write(fieldInfos, dir, fields);
final SegmentInfo si = new SegmentInfo(SEGMENT, 10000, dir, false, -1, SEGMENT, false, true, SegmentCodecs.build(fieldInfos, CodecProvider.getDefault()));
final FieldsProducer terms = si.getCodecInfo().codec().fieldsProducer(new SegmentReadState(dir, si, fieldInfos, 1024, IndexReader.DEFAULT_TERMS_INDEX_DIVISOR));
final FieldsProducer terms = si.getSegmentCodecs().codec().fieldsProducer(new SegmentReadState(dir, si, fieldInfos, 1024, IndexReader.DEFAULT_TERMS_INDEX_DIVISOR));
final Verify[] threads = new Verify[NUM_TEST_THREADS-1];
for(int i=0;i<NUM_TEST_THREADS-1;i++) {