Enum Class TenantProfile

java.lang.Object
java.lang.Enum<TenantProfile>
io.confluent.kafka.multitenant.metadata.TenantProfile
All Implemented Interfaces:
Serializable, Comparable<TenantProfile>, Constable

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

  • Method Details

    • values

      public static TenantProfile[] 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 TenantProfile 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
    • fromString

      public static Optional<TenantProfile> fromString(String name)
      Maps from all-caps snake case string to enum values. e.g. "K2_FREIGHT" -> TenantProfile.K2_FREIGHT

      Unrecognized strings resolve to Optional.empty(), identical to no profile being set. That includes "K1_DEDICATED": Dedicated deliberately has no profile, because its per-tenant configs are meant to resolve to the broker's own values via TenantBrokerConfigFallback rather than to per-SKU constants that would shadow them. See TenantProfileTest#fromStringReturnsEmptyForK1Dedicated.

      Returns:
      Corresponding TenantProfile. Optional.empty() if there are no matches.