Enum Class StreamType

java.lang.Object
java.lang.Enum<StreamType>
org.elasticsearch.common.streams.StreamType
All Implemented Interfaces:
Serializable, Comparable<StreamType>, Constable

public enum StreamType extends Enum<StreamType>
  • Enum Constant Details

  • Method Details

    • values

      public static StreamType[] 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 StreamType 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
    • getStreamName

      public String getStreamName()
    • streamTypeIsEnabled

      public boolean streamTypeIsEnabled(ProjectMetadata projectMetadata)
    • fromString

      public static StreamType fromString(String text)
    • exactEnabledStreamMatch

      @Nullable public static StreamType exactEnabledStreamMatch(ProjectMetadata projectMetadata, String indexName)
      For a given index name, return the StreamType that it matches exactly.
    • enabledParentStreamOf

      @Nullable public static StreamType enabledParentStreamOf(ProjectMetadata projectMetadata, String indexName)
      For a given index name, return the enabled stream of which it would be part. For example, for an index 'logs.ecs.foo' if the LOGS_ECS stream type is enabled, this will return LOGS_ECS. If LOGS_ECS were not enabled but LOGS was, then LOGS would be returned. If neither were enabled, null would be returned. If no enabled stream type matches, returns null.