类 PropertiesUtils
java.lang.Object
org.apache.pulsar.client.internal.PropertiesUtils
Internal utility methods for filtering and mapping
Properties
objects.-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明filterAndMapProperties
(Properties props, String prefix) Filters theProperties
object so that only properties with the configured prefix are retained, and then removes that prefix and puts the key value pairs into the result map.filterAndMapProperties
(Properties props, String srcPrefix, String targetPrefix) Filters theProperties
object so that only properties with the configured prefix are retained, and then replaces the srcPrefix with the targetPrefix when putting the key value pairs in the resulting map.
-
构造器详细资料
-
PropertiesUtils
public PropertiesUtils()
-
-
方法详细资料
-
filterAndMapProperties
Filters theProperties
object so that only properties with the configured prefix are retained, and then removes that prefix and puts the key value pairs into the result map.- 参数:
props
- - the properties object to filterprefix
- - the prefix to filter against and then remove for keys in the resulting map- 返回:
- a map of properties
-
filterAndMapProperties
public static Map<String,Object> filterAndMapProperties(Properties props, String srcPrefix, String targetPrefix) Filters theProperties
object so that only properties with the configured prefix are retained, and then replaces the srcPrefix with the targetPrefix when putting the key value pairs in the resulting map.- 参数:
props
- - the properties object to filtersrcPrefix
- - the prefix to filter against and then remove for keys in the resulting maptargetPrefix
- - the prefix to add to keys in the result map- 返回:
- a map of properties
-