Class Version

java.lang.Object
org.apache.dubbo.common.Version

public final class Version extends Object
Version
  • Field Details

  • Method Details

    • getProtocolVersion

      public static String getProtocolVersion()
    • getVersion

      public static String getVersion()
    • getLastCommitId

      public static String getLastCommitId()
    • compare

      public static int compare(String version1, String version2)
      Compare versions
      Returns:
      the value 0 if version1 == version2; a value less than 0 if version1 < version2; and a value greater than 0 if version1 > 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
      Parameters:
      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.
      Parameters:
      version - , the protocol version.
      Returns:
    • getIntVersion

      public static int getIntVersion(String version)
    • getVersion

      public static String getVersion(Class<?> cls, String defaultVersion)