枚举 AbilityKey

java.lang.Object
java.lang.Enum<AbilityKey>
com.alibaba.nacos.api.ability.constant.AbilityKey
所有已实现的接口:
Serializable, Comparable<AbilityKey>, java.lang.constant.Constable

public enum AbilityKey extends Enum<AbilityKey>
Ability key constant. It is used to constrain the ability key.
Ensure that return value of getName() is unique under one specify AbilityMode.
作者:
Daydreamer
  • 枚举常量详细资料

    • SERVER_PERSISTENT_INSTANCE_BY_GRPC

      public static final AbilityKey SERVER_PERSISTENT_INSTANCE_BY_GRPC
      Server support register or deregister persistent instance by grpc.
    • SERVER_FUZZY_WATCH

      public static final AbilityKey SERVER_FUZZY_WATCH
      For fuzzy watch naming or config.
    • SERVER_DISTRIBUTED_LOCK

      public static final AbilityKey SERVER_DISTRIBUTED_LOCK
      For Distributed Lock.
    • SDK_CLIENT_FUZZY_WATCH

      public static final AbilityKey SDK_CLIENT_FUZZY_WATCH
      For Test temporarily.
    • SDK_CLIENT_DISTRIBUTED_LOCK

      public static final AbilityKey SDK_CLIENT_DISTRIBUTED_LOCK
      For Test temporarily.
    • CLUSTER_CLIENT_TEST_1

      public static final AbilityKey CLUSTER_CLIENT_TEST_1
      For Test temporarily.
  • 字段详细资料

    • keyName

      private final String keyName
      the name of a certain ability.
    • description

      private final String description
      description or comment about this ability.
    • mode

      private final AbilityMode mode
      ability mode, which endpoint hold this ability.
    • ALL_ABILITIES

      private static final Map<AbilityMode,Map<String,AbilityKey>> ALL_ABILITIES
      All key set.
  • 构造器详细资料

  • 方法详细资料

    • values

      public static AbilityKey[] values()
      返回包含该枚举类型的常量的数组, 顺序与声明这些常量的顺序相同
      返回:
      包含该枚举类型的常量的数组,顺序与声明这些常量的顺序相同
    • valueOf

      public static AbilityKey valueOf(String name)
      返回带有指定名称的该类型的枚举常量。 字符串必须与用于声明该类型的枚举常量的 标识符完全匹配。(不允许有多余 的空格字符。)
      参数:
      name - 要返回的枚举常量的名称。
      返回:
      返回带有指定名称的枚举常量
      抛出:
      IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量
      NullPointerException - 如果参数为空值
    • getName

      public String getName()
    • getDescription

      public String getDescription()
    • getMode

      public AbilityMode getMode()
    • getAllValues

      public static Collection<AbilityKey> getAllValues(AbilityMode mode)
      Get all keys.
      返回:
      all keys
    • getAllNames

      public static Collection<String> getAllNames(AbilityMode mode)
      Get all names.
      返回:
      all names
    • isLegalKey

      public static boolean isLegalKey(AbilityMode mode, String name)
      Whether contains this name.
      参数:
      name - key name
      返回:
      whether contains
    • mapEnum

      public static Map<AbilityKey,Boolean> mapEnum(AbilityMode mode, Map<String,Boolean> abilities)
      Map the string key to enum.
      参数:
      abilities - map
      返回:
      enum map
    • mapStr

      public static Map<String,Boolean> mapStr(Map<AbilityKey,Boolean> abilities)
      . Map the string key to enum
      参数:
      abilities - map
      返回:
      enum map
    • getEnum

      public static AbilityKey getEnum(AbilityMode mode, String key)
      . getter to obtain enum
      参数:
      key - string key
      返回:
      enum