remove dead code

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1069912 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2011-02-11 18:16:43 +00:00
parent d733c07a56
commit 00ad6999ca
8 changed files with 0 additions and 130 deletions

View File

@ -168,25 +168,6 @@ public abstract class FixedIntBlockIndexInput extends IntIndexInput {
assert upto < blockSize;
}
@Override
public void read(final IntIndexInput.Reader indexIn, final boolean absolute) throws IOException {
if (absolute) {
fp = indexIn.readVLong();
upto = indexIn.next();
} else {
final long delta = indexIn.readVLong();
if (delta == 0) {
// same block
upto += indexIn.next();
} else {
// new block
fp += delta;
upto = indexIn.next();
}
}
assert upto < blockSize;
}
@Override
public void seek(final IntIndexInput.Reader other) throws IOException {
((Reader) other).seek(fp, upto);

View File

@ -93,25 +93,6 @@ public abstract class FixedIntBlockIndexOutput extends IntIndexOutput {
lastFP = fp;
}
@Override
public void write(IntIndexOutput indexOut, boolean absolute) throws IOException {
if (absolute) {
indexOut.writeVLong(fp);
indexOut.write(upto);
} else if (fp == lastFP) {
// same block
indexOut.writeVLong(0);
assert upto >= lastUpto;
indexOut.write(upto - lastUpto);
} else {
// new block
indexOut.writeVLong(fp - lastFP);
indexOut.write(upto);
}
lastUpto = upto;
lastFP = fp;
}
@Override
public String toString() {
return "fp=" + fp + " upto=" + upto;

View File

@ -189,24 +189,6 @@ public abstract class VariableIntBlockIndexInput extends IntIndexInput {
//assert upto < maxBlockSize: "upto=" + upto + " max=" + maxBlockSize;
}
@Override
public void read(final IntIndexInput.Reader indexIn, final boolean absolute) throws IOException {
if (absolute) {
fp = indexIn.readVLong();
upto = indexIn.next()&0xFF;
} else {
final long delta = indexIn.readVLong();
if (delta == 0) {
// same block
upto = indexIn.next()&0xFF;
} else {
// new block
fp += delta;
upto = indexIn.next()&0xFF;
}
}
}
@Override
public String toString() {
return "VarIntBlock.Index fp=" + fp + " upto=" + upto + " maxBlock=" + maxBlockSize;

View File

@ -103,26 +103,6 @@ public abstract class VariableIntBlockIndexOutput extends IntIndexOutput {
lastUpto = upto;
lastFP = fp;
}
@Override
public void write(IntIndexOutput indexOut, boolean absolute) throws IOException {
assert upto >= 0;
if (absolute) {
indexOut.writeVLong(fp);
indexOut.write(upto);
} else if (fp == lastFP) {
// same block
indexOut.writeVLong(0);
assert upto >= lastUpto;
indexOut.write(upto);
} else {
// new block
indexOut.writeVLong(fp - lastFP);
indexOut.write(upto);
}
lastUpto = upto;
lastFP = fp;
}
}
@Override

View File

@ -41,8 +41,6 @@ public abstract class IntIndexInput implements Closeable {
public abstract void read(DataInput indexIn, boolean absolute) throws IOException;
public abstract void read(IntIndexInput.Reader indexIn, boolean absolute) throws IOException;
/** Seeks primary stream to the last read offset */
public abstract void seek(IntIndexInput.Reader stream) throws IOException;
@ -57,18 +55,6 @@ public abstract class IntIndexInput implements Closeable {
/** Reads next single int */
public abstract int next() throws IOException;
/** Encodes as 1 or 2 ints, and can only use 61 of the 64
* long bits. */
public long readVLong() throws IOException {
final int v = next();
if ((v & 1) == 0) {
return v >> 1;
} else {
final long v2 = next();
return (v2 << 30) | (v >> 1);
}
}
/** Reads next chunk of ints */
private IntsRef bulkResult;

View File

@ -38,23 +38,6 @@ public abstract class IntIndexOutput implements Closeable {
* >= 0. */
public abstract void write(int v) throws IOException;
public static final long MAX_SINGLE_INT_VLONG = Integer.MAX_VALUE - (1<<30);
public static final long MAX_VLONG = Long.MAX_VALUE - (1L<<62) - (1L<<61);
/** Encodes as 1 or 2 ints, and can only use 61 of the 64
* long bits. */
public void writeVLong(long v) throws IOException {
assert v >= 0: "v=" + v;
assert v < MAX_VLONG: "v=" + v;
// we cannot pass a negative int
if (v <= MAX_SINGLE_INT_VLONG) {
write(((int) v)<<1);
} else {
write(((int) ((v & MAX_SINGLE_INT_VLONG))<<1) | 1);
write(((int) (v >> 30)));
}
}
public abstract static class Index {
/** Internally records the current location */
@ -66,8 +49,6 @@ public abstract class IntIndexOutput implements Closeable {
/** Writes "location" of current output pointer of primary
* output to different output (out) */
public abstract void write(IndexOutput indexOut, boolean absolute) throws IOException;
public abstract void write(IntIndexOutput indexOut, boolean absolute) throws IOException;
}
/** If you are indexing the primary output file, call

View File

@ -82,16 +82,6 @@ public class MockSingleIntIndexInput extends IntIndexInput {
}
}
@Override
public void read(IntIndexInput.Reader indexIn, boolean absolute)
throws IOException {
if (absolute) {
fp = indexIn.readVLong();
} else {
fp += indexIn.readVLong();
}
}
@Override
public void set(IntIndexInput.Index other) {
fp = ((Index) other).fp;

View File

@ -77,17 +77,6 @@ public class MockSingleIntIndexOutput extends IntIndexOutput {
}
lastFP = fp;
}
@Override
public void write(IntIndexOutput indexOut, boolean absolute)
throws IOException {
if (absolute) {
indexOut.writeVLong(fp);
} else {
indexOut.writeVLong(fp - lastFP);
}
lastFP = fp;
}
@Override
public String toString() {