Class CassandraVersion

java.lang.Object
org.apache.cassandra.utils.CassandraVersion
All Implemented Interfaces:
Comparable<CassandraVersion>

public class CassandraVersion extends Object implements Comparable<CassandraVersion>
Implements versioning used in Cassandra and CQL.

Note: The following code uses a slight variation from the semver document (http://semver.org).

  • Field Details

    • CASSANDRA_5_0

      public static final CassandraVersion CASSANDRA_5_0
    • CASSANDRA_4_1

      public static final CassandraVersion CASSANDRA_4_1
    • CASSANDRA_4_0

      public static final CassandraVersion CASSANDRA_4_0
    • CASSANDRA_4_0_RC2

      public static final CassandraVersion CASSANDRA_4_0_RC2
    • CASSANDRA_3_4

      public static final CassandraVersion CASSANDRA_3_4
    • UNREADABLE_VERSION

      public static final CassandraVersion UNREADABLE_VERSION
      Used to indicate that there was a previous version written to the legacy (pre 1.2) system.Versions table, but that we cannot read it. Suffice to say, any upgrade should proceed through 1.2.x before upgrading to the current version.
    • NULL_VERSION

      public static final CassandraVersion NULL_VERSION
      Used to indicate that no previous version information was found. When encountered, we assume that Cassandra was not previously installed and we're in the process of starting a fresh node.
    • major

      public final int major
    • minor

      public final int minor
    • patch

      public final int patch
    • hotfix

      public final int hotfix
    • familyLowerBound

      public final Supplier<CassandraVersion> familyLowerBound
  • Constructor Details

    • CassandraVersion

      public CassandraVersion(String version)
      Parse a version from a string.
      Parameters:
      version - the string to parse
      Throws:
      IllegalArgumentException - if the provided string does not represent a version
  • Method Details