Enum Class GridGainFeature

java.lang.Object
java.lang.Enum<GridGainFeature>
org.gridgain.internal.upgrade.GridGainFeature
All Implemented Interfaces:
Serializable, Comparable<GridGainFeature>, Constable

public enum GridGainFeature extends Enum<GridGainFeature>
Enumerates cluster-wide features whose availability is determined by the presence of the feature on every node in the logical topology.

Each node advertises all features it knows about via a BitSet stored in the system attribute "gridgain.features". A feature is considered supported cluster-wide when all nodes in the logical topology have the corresponding bit set.

During a rolling upgrade, new features will become available only after every old node has been replaced by a node whose code includes the feature.

Note: when adding a new feature, assign a unique featureId that has never been used before (including by removed features). Please keep the features list up to date.

  • Enum Constant Details

    • SQL_STAT_GATHERING_V2

      public static final GridGainFeature SQL_STAT_GATHERING_V2
      SQL statistics gathering V2.
    • SQL_SHARED_STATE_V2

      public static final GridGainFeature SQL_SHARED_STATE_V2
      SQL shared state V2 protocol for query batching.
    • LOCAL_SNAPSHOT_SCANNING

      public static final GridGainFeature LOCAL_SNAPSHOT_SCANNING
      Local snapshot scanning. When `snapshot list` command is executed, it will also consider/return snapshots from local URIs.
    • PARTITION_STORAGE_ADMISSION

      public static final GridGainFeature PARTITION_STORAGE_ADMISSION
      Partition stop-write logic (NodeStorageStateMessage / NodeStorageStateRequestMessage).
  • Field Details

    • NODE_ATTRIBUTES_KEY

      public static final String NODE_ATTRIBUTES_KEY
      System attribute key under which the node's supported-features BitSet is stored.
      See Also:
  • Method Details

    • values

      public static GridGainFeature[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static GridGainFeature valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • featureId

      public int featureId()
      Returns the unique bit position for this feature.
    • allFeatures

      public static BitSet allFeatures()
      Returns a BitSet with bits set for every feature known to this build.
    • supports

      public static boolean supports(@Nullable @Nullable String encoded, GridGainFeature feature)
      Checks whether the given feature is present in a Base64-encoded feature set.
      Parameters:
      encoded - Base64-encoded feature set previously produced by encode(java.util.BitSet), or null.
      feature - Feature to check.
      Returns:
      true if the feature bit is set.
    • encode

      public static String encode(BitSet bitSet)
      Encodes a BitSet into a Base64 string suitable for node attributes.