Package org.apache.flink.metrics
Class MetricConfig
- java.lang.Object
-
- java.util.Dictionary<K,V>
-
- java.util.Hashtable<Object,Object>
-
- java.util.Properties
-
- org.apache.flink.metrics.MetricConfig
-
- All Implemented Interfaces:
Serializable,Cloneable,Map<Object,Object>
@Public public class MetricConfig extends Properties
A properties class with added utility method to extract primitives.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.Properties
defaults
-
-
Constructor Summary
Constructors Constructor Description MetricConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetBoolean(String key, boolean defaultValue)Searches for the property with the specified key in this property list.doublegetDouble(String key, double defaultValue)Searches for the property with the specified key in this property list.floatgetFloat(String key, float defaultValue)Searches for the property with the specified key in this property list.intgetInteger(String key, int defaultValue)Searches for the property with the specified key in this property list.longgetLong(String key, long defaultValue)Searches for the property with the specified key in this property list.StringgetString(String key, String defaultValue)-
Methods inherited from class java.util.Properties
clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, getProperty, getProperty, hashCode, isEmpty, keys, keySet, list, list, load, load, loadFromXML, merge, propertyNames, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, save, setProperty, size, store, store, storeToXML, storeToXML, storeToXML, stringPropertyNames, toString, values
-
-
-
-
Method Detail
-
getInteger
public int getInteger(String key, int defaultValue)
Searches for the property with the specified key in this property list. If the key is not found in this property list, the default property list, and its defaults, recursively, are then checked. The method returns the default value argument if the property is not found.- Parameters:
key- the hashtable key.defaultValue- a default value.- Returns:
- the value in this property list with the specified key value parsed as an int.
-
getLong
public long getLong(String key, long defaultValue)
Searches for the property with the specified key in this property list. If the key is not found in this property list, the default property list, and its defaults, recursively, are then checked. The method returns the default value argument if the property is not found.- Parameters:
key- the hashtable key.defaultValue- a default value.- Returns:
- the value in this property list with the specified key value parsed as a long.
-
getFloat
public float getFloat(String key, float defaultValue)
Searches for the property with the specified key in this property list. If the key is not found in this property list, the default property list, and its defaults, recursively, are then checked. The method returns the default value argument if the property is not found.- Parameters:
key- the hashtable key.defaultValue- a default value.- Returns:
- the value in this property list with the specified key value parsed as a float.
-
getDouble
public double getDouble(String key, double defaultValue)
Searches for the property with the specified key in this property list. If the key is not found in this property list, the default property list, and its defaults, recursively, are then checked. The method returns the default value argument if the property is not found.- Parameters:
key- the hashtable key.defaultValue- a default value.- Returns:
- the value in this property list with the specified key value parsed as a double.
-
getBoolean
public boolean getBoolean(String key, boolean defaultValue)
Searches for the property with the specified key in this property list. If the key is not found in this property list, the default property list, and its defaults, recursively, are then checked. The method returns the default value argument if the property is not found.- Parameters:
key- the hashtable key.defaultValue- a default value.- Returns:
- the value in this property list with the specified key value parsed as a boolean.
-
-