public final class Version extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_DUBBO_PROTOCOL_VERSION |
static int |
HIGHEST_PROTOCOL_VERSION |
static int |
LEGACY_DUBBO_PROTOCOL_VERSION |
static int |
LOWEST_VERSION_FOR_RESPONSE_ATTACHMENT
For protocol compatibility purpose.
|
| Modifier and Type | Method and Description |
|---|---|
static int |
compare(String version1,
String version2)
Compare versions
|
static int |
getIntVersion(String version) |
static String |
getLastCommitId() |
static String |
getProtocolVersion() |
static String |
getVersion() |
static String |
getVersion(Class<?> cls,
String defaultVersion) |
static boolean |
isRelease263OrHigher(String version)
Check the framework release version number to decide if it's 2.6.3 or higher
|
static boolean |
isRelease270OrHigher(String version)
Check the framework release version number to decide if it's 2.7.0 or higher
|
static boolean |
isSupportResponseAttachment(String version)
Dubbo 2.x protocol version numbers are limited to 2.0.2/2000200 ~ 2.0.99/2009900, other versions are consider as
invalid or not from official release.
|
public static final String DEFAULT_DUBBO_PROTOCOL_VERSION
public static final int LEGACY_DUBBO_PROTOCOL_VERSION
public static final int LOWEST_VERSION_FOR_RESPONSE_ATTACHMENT
isSupportResponseAttachment(java.lang.String) is checked for every call, int compare expect to has higher
performance than string.public static final int HIGHEST_PROTOCOL_VERSION
public static String getProtocolVersion()
public static String getVersion()
public static String getLastCommitId()
public static int compare(String version1, String version2)
0 if version1 == version2;
a value less than 0 if version1 < version2; and
a value greater than 0 if version1 > version2public static boolean isRelease270OrHigher(String version)
public static boolean isRelease263OrHigher(String version)
version, - the sdk versionpublic static boolean isSupportResponseAttachment(String version)
version, - the protocol version.public static int getIntVersion(String version)
Copyright © 2011–2020 The Apache Software Foundation. All rights reserved.