public class GridProductVersion extends Object implements Comparable<GridProductVersion>, Externalizable
Node version can be acquired via GridNode.version() method.
Two versions are compared in the following order: major number, minor number, maintenance number, revision timestamp.
| Modifier and Type | Field and Description |
|---|---|
static GridProductVersion |
VERSION_DEV
Development version.
|
static GridProductVersion |
VERSION_UNKNOWN
Unknown version.
|
| Constructor and Description |
|---|
GridProductVersion()
Empty constructor required by
Externalizable. |
GridProductVersion(byte major,
byte minor,
byte maintenance,
long revTs,
byte[] revHash) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(GridProductVersion o) |
boolean |
equals(Object o) |
static GridProductVersion |
fromString(String verStr)
Tries to parse product version from it's string representation.
|
int |
hashCode() |
byte |
maintenance()
Gets maintenance version number.
|
byte |
major()
Gets major version number.
|
byte |
minor()
Gets minor version number.
|
void |
readExternal(ObjectInput in) |
protected Object |
readResolve() |
Date |
releaseDate()
Gets release date.
|
byte[] |
revisionHash()
Gets revision hash.
|
long |
revisionTimestamp()
Gets revision timestamp.
|
String |
toString() |
void |
writeExternal(ObjectOutput out) |
public static final GridProductVersion VERSION_DEV
public static final GridProductVersion VERSION_UNKNOWN
public GridProductVersion()
Externalizable.public GridProductVersion(byte major,
byte minor,
byte maintenance,
long revTs,
byte[] revHash)
major - Major version number.minor - Minor version number.maintenance - Maintenance version number.revTs - Revision timestamp.revHash - Revision hash.public byte major()
public byte minor()
public byte maintenance()
public long revisionTimestamp()
public byte[] revisionHash()
public Date releaseDate()
public int compareTo(GridProductVersion o)
compareTo in interface Comparable<GridProductVersion>public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionprotected Object readResolve() throws ObjectStreamException
ObjectStreamException - In case of error.public static GridProductVersion fromString(String verStr)
VERSION_UNKNOWN
if string does not conform to version format.verStr - String representation of version.Copyright © 2014. All rights reserved.