Package org.jgroups
Class Version
java.lang.Object
org.jgroups.Version
We're using the scheme described at http://www.jboss.com/index.html?module=bbinvalid input: '&op'=viewtopicinvalid input: '&t'=77231
for major, minor and micro version numbers. We have 5 bits for major and minor version numbers each and
6 bits for the micro version.
This gives:
X = 0-31 for major versions
Y = 0-31 for minor versions
Z = 0-63 for micro versions
- Version:
- $Id: Version.java,v 1.59.2.16.2.2 2009/05/06 10:58:22 belaban Exp $ Holds version information for JGroups.
- Author:
- Bela Ban
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic short[]
decode
(short version) static short
encode
(int major, int minor, int micro) Method copied from http://www.jboss.com/index.html?module=bbinvalid input: '&op'=viewtopicinvalid input: '&t'=77231static boolean
isBinaryCompatible
(short ver) Checks whether ver is binary compatible with the current version.static boolean
isBinaryCompatible
(short ver1, short ver2) static boolean
isSame
(short v) Compares the specified version number against the current version number.static void
Prints the value of the description and cvs fields to System.out.static String
print
(short version) Method copied from http://www.jboss.com/index.html?module=bbinvalid input: '&op'=viewtopicinvalid input: '&t'=77231static String
Returns the catenation of the description and cvs fields.static String
Returns the version field as a String.
-
Field Details
-
major
public static final short major- See Also:
-
minor
public static final short minor- See Also:
-
micro
public static final short micro- See Also:
-
description
- See Also:
-
version
public static final short version -
string_version
-
cvs
- See Also:
-
-
Constructor Details
-
Version
public Version()
-
-
Method Details
-
main
Prints the value of the description and cvs fields to System.out.- Parameters:
args
-
-
printDescription
Returns the catenation of the description and cvs fields.- Returns:
- String with description
-
printVersion
Returns the version field as a String.- Returns:
- String with version
-
isSame
public static boolean isSame(short v) Compares the specified version number against the current version number.- Parameters:
v
- short- Returns:
- Result of == operator.
-
encode
public static short encode(int major, int minor, int micro) Method copied from http://www.jboss.com/index.html?module=bbinvalid input: '&op'=viewtopicinvalid input: '&t'=77231 -
print
Method copied from http://www.jboss.com/index.html?module=bbinvalid input: '&op'=viewtopicinvalid input: '&t'=77231 -
decode
public static short[] decode(short version) -
isBinaryCompatible
public static boolean isBinaryCompatible(short ver) Checks whether ver is binary compatible with the current version. The rule for binary compatibility is that the major and minor versions have to match, whereas micro versions can differ.- Parameters:
ver
-- Returns:
-
isBinaryCompatible
public static boolean isBinaryCompatible(short ver1, short ver2)
-