@NotThreadSafe public final class MetricsConfig extends Object
Constructor and Description |
---|
MetricsConfig(Properties properties)
Creates a new
MetricsConfig using the given Properties . |
MetricsConfig(String configFile)
Creates a new
MetricsConfig using the given config file. |
Modifier and Type | Method and Description |
---|---|
Properties |
getProperties() |
static Map<String,Properties> |
subProperties(Properties prop,
String regex)
Uses regex to parse every original property key to a prefix and a suffix.
|
String |
toString() |
public MetricsConfig(String configFile)
MetricsConfig
using the given config file.configFile
- config file to usepublic MetricsConfig(Properties properties)
MetricsConfig
using the given Properties
.properties
- properties to usepublic Properties getProperties()
public static Map<String,Properties> subProperties(Properties prop, String regex)
prop
- the original propertiesregex
- prefix and suffix patternMap
from the prefix to its propertiesCopyright © 2023. All Rights Reserved.