类 PropertiesUtils
- java.lang.Object
-
- org.apache.pulsar.client.internal.PropertiesUtils
-
public class PropertiesUtils extends java.lang.ObjectInternal utility methods for filtering and mappingPropertiesobjects.
-
-
构造器概要
构造器 构造器 说明 PropertiesUtils()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static java.util.Map<java.lang.String,java.lang.Object>filterAndMapProperties(java.util.Properties props, java.lang.String prefix)Filters thePropertiesobject 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.static java.util.Map<java.lang.String,java.lang.Object>filterAndMapProperties(java.util.Properties props, java.lang.String srcPrefix, java.lang.String targetPrefix)Filters thePropertiesobject 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.
-
-
-
方法详细资料
-
filterAndMapProperties
public static java.util.Map<java.lang.String,java.lang.Object> filterAndMapProperties(java.util.Properties props, java.lang.String prefix)Filters thePropertiesobject 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 java.util.Map<java.lang.String,java.lang.Object> filterAndMapProperties(java.util.Properties props, java.lang.String srcPrefix, java.lang.String targetPrefix)Filters thePropertiesobject 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
-
-