LUCENE-4055: rename method

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene4055@1341639 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2012-05-22 21:23:56 +00:00
parent ffb88a89ef
commit c2047945cb
9 changed files with 14 additions and 15 deletions

View File

@ -70,9 +70,8 @@ public abstract class Codec implements NamedSPILoader.NamedSPI {
/** Encodes/decodes field infos file */
public abstract FieldInfosFormat fieldInfosFormat();
/** Encodes/decodes segments file */
// nocommit rename
public abstract SegmentInfoFormat segmentInfosFormat();
/** Encodes/decodes segment info file */
public abstract SegmentInfoFormat segmentInfoFormat();
/** Encodes/decodes document normalization values */
public abstract NormsFormat normsFormat();

View File

@ -76,7 +76,7 @@ public class AppendingCodec extends Codec {
}
@Override
public SegmentInfoFormat segmentInfosFormat() {
public SegmentInfoFormat segmentInfoFormat() {
return infos;
}

View File

@ -113,7 +113,7 @@ public class Lucene3xCodec extends Codec {
}
@Override
public SegmentInfoFormat segmentInfosFormat() {
public SegmentInfoFormat segmentInfoFormat() {
return infosFormat;
}

View File

@ -83,7 +83,7 @@ public class Lucene40Codec extends Codec {
}
@Override
public SegmentInfoFormat segmentInfosFormat() {
public SegmentInfoFormat segmentInfoFormat() {
return infosFormat;
}

View File

@ -75,7 +75,7 @@ public final class SimpleTextCodec extends Codec {
}
@Override
public SegmentInfoFormat segmentInfosFormat() {
public SegmentInfoFormat segmentInfoFormat() {
return segmentInfos;
}

View File

@ -2044,7 +2044,7 @@ public class IndexWriter implements Closeable, TwoPhaseCommit {
// creating CFS so that 1) .si isn't slurped into CFS,
// and 2) .si reflects useCompoundFile=true change
// above:
codec.segmentInfosFormat().getSegmentInfosWriter().write(directory, newSegment.info, flushedSegment.fieldInfos, context);
codec.segmentInfoFormat().getSegmentInfosWriter().write(directory, newSegment.info, flushedSegment.fieldInfos, context);
// nocommit ideally we would freeze newSegment here!!
// because any changes after writing the .si will be
@ -2334,7 +2334,7 @@ public class IndexWriter implements Closeable, TwoPhaseCommit {
// creating CFS so that 1) .si isn't slurped into CFS,
// and 2) .si reflects useCompoundFile=true change
// above:
codec.segmentInfosFormat().getSegmentInfosWriter().write(trackingDir, info, mergeState.fieldInfos, context);
codec.segmentInfoFormat().getSegmentInfosWriter().write(trackingDir, info, mergeState.fieldInfos, context);
info.getFiles().addAll(trackingDir.getCreatedFiles());
// Register the new segment
@ -2420,7 +2420,7 @@ public class IndexWriter implements Closeable, TwoPhaseCommit {
// segment name (its own name, if its 3.x, and doc
// store segment name):
try {
newInfo.getCodec().segmentInfosFormat().getSegmentInfosWriter().write(directory, newInfo, null, context);
newInfo.getCodec().segmentInfoFormat().getSegmentInfosWriter().write(directory, newInfo, null, context);
} catch (UnsupportedOperationException uoe) {
// OK: 3x codec cannot write a new SI file;
// SegmentInfos will write this on commit
@ -3579,7 +3579,7 @@ public class IndexWriter implements Closeable, TwoPhaseCommit {
// above:
boolean success2 = false;
try {
codec.segmentInfosFormat().getSegmentInfosWriter().write(directory, merge.info.info, mergeState.fieldInfos, context);
codec.segmentInfoFormat().getSegmentInfosWriter().write(directory, merge.info.info, mergeState.fieldInfos, context);
success2 = true;
} finally {
if (!success2) {

View File

@ -284,7 +284,7 @@ public final class SegmentInfos implements Cloneable, Iterable<SegmentInfoPerCom
String segName = input.readString();
Codec codec = Codec.forName(input.readString());
//System.out.println("SIS.read seg=" + seg + " codec=" + codec);
SegmentInfo info = codec.segmentInfosFormat().getSegmentInfosReader().read(directory, segName, IOContext.READ);
SegmentInfo info = codec.segmentInfoFormat().getSegmentInfosReader().read(directory, segName, IOContext.READ);
info.setCodec(codec);
long delGen = input.readLong();
int delCount = input.readInt();

View File

@ -1150,7 +1150,7 @@ public class TestAddIndexes extends LuceneTestCase {
}
@Override
public SegmentInfoFormat segmentInfosFormat() {
public SegmentInfoFormat segmentInfoFormat() {
return new Lucene40SegmentInfoFormat();
}

View File

@ -66,11 +66,11 @@ public class PreFlexRWCodec extends Lucene3xCodec {
}
@Override
public SegmentInfoFormat segmentInfosFormat() {
public SegmentInfoFormat segmentInfoFormat() {
if (LuceneTestCase.PREFLEX_IMPERSONATION_IS_ACTIVE) {
return segmentInfos ;
} else {
return super.segmentInfosFormat();
return super.segmentInfoFormat();
}
}