public final class MemberVersion extends Object implements IdentifiedDataSerializable, Serializable, Comparable<MemberVersion>
Modifier and Type | Field and Description |
---|---|
static Comparator<MemberVersion> |
MAJOR_MINOR_VERSION_COMPARATOR
Version comparator that takes into account only major & minor version, disregarding patch version number.
|
static MemberVersion |
UNKNOWN
UNKNOWN version.
|
Constructor and Description |
---|
MemberVersion() |
MemberVersion(int major,
int minor,
int patch) |
MemberVersion(String version) |
Modifier and Type | Method and Description |
---|---|
Version |
asVersion() |
int |
compareTo(MemberVersion otherVersion) |
boolean |
equals(Object o) |
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
int |
getId()
Returns type identifier for this class.
|
byte |
getMajor() |
byte |
getMinor() |
byte |
getPatch() |
int |
hashCode() |
boolean |
isUnknown() |
static MemberVersion |
of(int major,
int minor,
int patch) |
static MemberVersion |
of(String version) |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
String |
toString() |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
public static final MemberVersion UNKNOWN
public static final transient Comparator<MemberVersion> MAJOR_MINOR_VERSION_COMPARATOR
public MemberVersion()
public MemberVersion(int major, int minor, int patch)
public MemberVersion(String version)
public byte getMajor()
public byte getMinor()
public byte getPatch()
public boolean isUnknown()
public void writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
out
- outputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
output stream has been closed.public void readData(ObjectDataInput in) throws IOException
DataSerializable
readData
in interface DataSerializable
in
- inputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
input stream has been closed.public static MemberVersion of(int major, int minor, int patch)
public static MemberVersion of(String version)
public int getFactoryId()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public int getId()
IdentifiedDataSerializable
getId
in interface IdentifiedDataSerializable
public int compareTo(MemberVersion otherVersion)
compareTo
in interface Comparable<MemberVersion>
Copyright © 2018 Hazelcast, Inc.. All rights reserved.