Remove PROTOTYPE from VersionType
This commit is contained in:
parent
b7afd80b3f
commit
ca54b408a3
|
@ -266,8 +266,6 @@ public enum VersionType implements Writeable<VersionType> {
|
||||||
|
|
||||||
private final byte value;
|
private final byte value;
|
||||||
|
|
||||||
private static final VersionType PROTOTYPE = INTERNAL;
|
|
||||||
|
|
||||||
VersionType(byte value) {
|
VersionType(byte value) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
|
@ -383,17 +381,12 @@ public enum VersionType implements Writeable<VersionType> {
|
||||||
throw new IllegalArgumentException("No version type match [" + value + "]");
|
throw new IllegalArgumentException("No version type match [" + value + "]");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public static VersionType readVersionTypeFrom(StreamInput in) throws IOException {
|
||||||
public VersionType readFrom(StreamInput in) throws IOException {
|
|
||||||
int ordinal = in.readVInt();
|
int ordinal = in.readVInt();
|
||||||
assert (ordinal == 0 || ordinal == 1 || ordinal == 2 || ordinal == 3);
|
assert (ordinal == 0 || ordinal == 1 || ordinal == 2 || ordinal == 3);
|
||||||
return VersionType.values()[ordinal];
|
return VersionType.values()[ordinal];
|
||||||
}
|
}
|
||||||
|
|
||||||
public static VersionType readVersionTypeFrom(StreamInput in) throws IOException {
|
|
||||||
return PROTOTYPE.readFrom(in);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeTo(StreamOutput out) throws IOException {
|
public void writeTo(StreamOutput out) throws IOException {
|
||||||
out.writeVInt(ordinal());
|
out.writeVInt(ordinal());
|
||||||
|
|
Loading…
Reference in New Issue