类 ConnLabelsUtils

java.lang.Object
com.alibaba.nacos.common.utils.ConnLabelsUtils

public class ConnLabelsUtils extends Object
ConnLabelsUtils.
作者:
rong
  • 字段详细资料

    • LABEL_EQUALS_OPERATOR

      public static final String LABEL_EQUALS_OPERATOR
      另请参阅:
    • LABEL_SPLIT_OPERATOR

      public static final String LABEL_SPLIT_OPERATOR
      另请参阅:
    • TAG_V2_LABEL_KEY_VALUE_SPLIT_LENGTH

      public static final int TAG_V2_LABEL_KEY_VALUE_SPLIT_LENGTH
      另请参阅:
  • 构造器详细资料

    • ConnLabelsUtils

      public ConnLabelsUtils()
  • 方法详细资料

    • parsePropertyValue2Map

      public static Map<String,String> parsePropertyValue2Map(Properties properties, String propertyName)
      parse property value to map.
      参数:
      properties - Properties
      propertyName - which key to get
      返回:
      (String)key-(String)value map
    • parseRawLabels

      public static Map<String,String> parseRawLabels(String rawLabels)
      parse raw json labels into a key-value map.
      参数:
      rawLabels - rawLabels to parse
      返回:
      map parsed from rawLabels
    • mergeMapByOrder

      public static <T, R> Map<T,R> mergeMapByOrder(Map<T,R> preferredMap, Map<T,R> backwardMap)
      merge two map into one by using the former value when key is duplicated.
      参数:
      preferredMap - preferredMap
      backwardMap - backwardMap
    • addPrefixForEachKey

      public static <T> Map<String,T> addPrefixForEachKey(Map<String,T> map, String prefix)
      add prefix for each key in map.
      参数:
      map - map to add prefix
      prefix - prefix