Class Component.Type

java.lang.Object
org.apache.cassandra.io.sstable.Component.Type
Enclosing class:
Component

public static final class Component.Type extends Object
WARNING: Be careful while changing the names or string representation of the enum members. Streaming code depends on the names during streaming (Ref: CASSANDRA-14556).
  • Field Details

    • all

      public static final List<Component.Type> all
    • id

      public final int id
    • name

      public final String name
    • repr

      public final String repr
    • streamable

      public final boolean streamable
    • formatClass

      public final Class<? extends SSTableFormat> formatClass
  • Method Details

    • create

      public static Component.Type create(String name, String repr, boolean streamable, Class<? extends SSTableFormat<?,?>> formatClass)
      Creates a new non-singleton type and registers it a global type registry - see registerType(Type).
      Parameters:
      name - type name, must be unique for this and all parent formats
      repr - the regular expression to be used to recognize a name represents this type
      streamable - whether components of this type should be streamed to other nodes
      formatClass - format class for which this type is defined for
    • createSingleton

      public static Component.Type createSingleton(String name, String repr, boolean streamable, Class<? extends SSTableFormat<?,?>> formatClass)
      Creates a new singleton type and registers it in a global type registry - see registerType(Type).
      Parameters:
      name - type name, must be unique for this and all parent formats
      repr - the regular expression to be used to recognize a name represents this type
      streamable - whether components of this type should be streamed to other nodes
      formatClass - format class for which this type is defined for
    • fromRepresentation

      public static Component.Type fromRepresentation(String repr, SSTableFormat<?,?> format)
    • createComponent

      public static Component createComponent(String repr, SSTableFormat<?,?> format)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getSingleton

      public Component getSingleton()
    • createComponent

      public Component createComponent(String repr)