类 Version
- java.lang.Object
-
- org.apache.dubbo.common.Version
-
public final class Version extends Object
Version
-
-
字段概要
字段 修饰符和类型 字段 说明 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.
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static void
checkDuplicate(Class<?> cls)
static void
checkDuplicate(Class<?> cls, boolean failOnError)
static void
checkDuplicate(String path, boolean failOnError)
static int
compare(String version1, String version2)
Compare versionsstatic int
getIntVersion(String version)
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 higherstatic boolean
isRelease270OrHigher(String version)
Check the framework release version number to decide if it's 2.7.0 or higherstatic 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.
-
-
-
字段详细资料
-
DEFAULT_DUBBO_PROTOCOL_VERSION
public static final String DEFAULT_DUBBO_PROTOCOL_VERSION
- 另请参阅:
- 常量字段值
-
LEGACY_DUBBO_PROTOCOL_VERSION
public static final int LEGACY_DUBBO_PROTOCOL_VERSION
- 另请参阅:
- 常量字段值
-
LOWEST_VERSION_FOR_RESPONSE_ATTACHMENT
public static final int LOWEST_VERSION_FOR_RESPONSE_ATTACHMENT
For protocol compatibility purpose. BecauseisSupportResponseAttachment(java.lang.String)
is checked for every call, int compare expect to has higher performance than string.- 另请参阅:
- 常量字段值
-
HIGHEST_PROTOCOL_VERSION
public static final int HIGHEST_PROTOCOL_VERSION
- 另请参阅:
- 常量字段值
-
-
方法详细资料
-
getProtocolVersion
public static String getProtocolVersion()
-
getVersion
public static String getVersion()
-
compare
public static int compare(String version1, String version2)
Compare versions- 返回:
- the value
0
ifversion1 == version2
; a value less than0
ifversion1 < version2
; and a value greater than0
ifversion1 > version2
-
isRelease270OrHigher
public static boolean isRelease270OrHigher(String version)
Check the framework release version number to decide if it's 2.7.0 or higher
-
isRelease263OrHigher
public static boolean isRelease263OrHigher(String version)
Check the framework release version number to decide if it's 2.6.3 or higher- 参数:
version
- , the sdk version
-
isSupportResponseAttachment
public 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.- 参数:
version
- , the protocol version.- 返回:
-
getIntVersion
public static int getIntVersion(String version)
-
checkDuplicate
public static void checkDuplicate(Class<?> cls, boolean failOnError)
-
checkDuplicate
public static void checkDuplicate(Class<?> cls)
-
checkDuplicate
public static void checkDuplicate(String path, boolean failOnError)
-
-