From e95fbfd1df9b85a146946aca586f639f848112be Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Fri, 12 Nov 2010 21:17:23 +0000 Subject: [PATCH] Renamed getCodecInfo to getSegmentCodecs for consistency git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1034570 13f79535-47bb-0310-9956-ffa450edef68 --- lucene/src/java/org/apache/lucene/index/CheckIndex.java | 2 +- lucene/src/java/org/apache/lucene/index/SegmentInfo.java | 6 +++--- lucene/src/java/org/apache/lucene/index/SegmentInfos.java | 2 +- lucene/src/java/org/apache/lucene/index/SegmentReader.java | 4 ++-- lucene/src/test/org/apache/lucene/index/TestCodecs.java | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lucene/src/java/org/apache/lucene/index/CheckIndex.java b/lucene/src/java/org/apache/lucene/index/CheckIndex.java index 4d417de4d60..ee7793e5235 100644 --- a/lucene/src/java/org/apache/lucene/index/CheckIndex.java +++ b/lucene/src/java/org/apache/lucene/index/CheckIndex.java @@ -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()); diff --git a/lucene/src/java/org/apache/lucene/index/SegmentInfo.java b/lucene/src/java/org/apache/lucene/index/SegmentInfo.java index d1eeea50f30..201af664d12 100644 --- a/lucene/src/java/org/apache/lucene/index/SegmentInfo.java +++ b/lucene/src/java/org/apache/lucene/index/SegmentInfo.java @@ -85,7 +85,7 @@ public final class SegmentInfo { private Map 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; } diff --git a/lucene/src/java/org/apache/lucene/index/SegmentInfos.java b/lucene/src/java/org/apache/lucene/index/SegmentInfos.java index d8d50fb2148..7d41372e96c 100644 --- a/lucene/src/java/org/apache/lucene/index/SegmentInfos.java +++ b/lucene/src/java/org/apache/lucene/index/SegmentInfos.java @@ -308,7 +308,7 @@ public final class SegmentInfos extends Vector { SegmentInfos sis = (SegmentInfos) super.clone(); for(int i=0;i(userData); diff --git a/lucene/src/java/org/apache/lucene/index/SegmentReader.java b/lucene/src/java/org/apache/lucene/index/SegmentReader.java index 6adf9554282..8758ea560f6 100644 --- a/lucene/src/java/org/apache/lucene/index/SegmentReader.java +++ b/lucene/src/java/org/apache/lucene/index/SegmentReader.java @@ -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; diff --git a/lucene/src/test/org/apache/lucene/index/TestCodecs.java b/lucene/src/test/org/apache/lucene/index/TestCodecs.java index afb76464108..769ea0e9bee 100644 --- a/lucene/src/test/org/apache/lucene/index/TestCodecs.java +++ b/lucene/src/test/org/apache/lucene/index/TestCodecs.java @@ -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