Class MapConfiguration
java.lang.Object
io.trino.tempto.internal.configuration.AbstractConfiguration
io.trino.tempto.internal.configuration.MapConfiguration
- All Implemented Interfaces:
Configuration
This class constructs and stores a map based configuration using nested maps.
For leafs - value is stored in map. For non-leaf - nested map is stored.
Outer map is responsible for first part in all keys stored in configuration. Maps stored at first internal level are responsible for second part in stored keys and so on.
For example, for a configuration storing these hierarchical entries: a.b.c = 3 a.x = 10 b.c = 15
the following map structure would be created
{
a : {
b : {
c : 3
},
x : 10
},
b : {
c : 15
}
}
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetSubconfiguration(String keyPrefix) Returns configuration containing all keys starting with given prefix.listKeys()Lists all keys in configurationLists configuration key prefixes of length=1Methods inherited from class io.trino.tempto.internal.configuration.AbstractConfiguration
asMap, equals, getBoolean, getBooleanMandatory, getBooleanMandatory, getDouble, getDoubleMandatory, getDoubleMandatory, getInt, getIntMandatory, getIntMandatory, getString, getStringList, getStringListMandatory, getStringListMandatory, getStringMandatory, getStringMandatory, getStringOrList, hashCode, isList
-
Constructor Details
-
MapConfiguration
-
-
Method Details
-
get
-
listKeys
Description copied from interface:ConfigurationLists all keys in configuration- Returns:
- List of keys
-
listPrefixes
Description copied from interface:ConfigurationLists configuration key prefixes of length=1E.g. for configuration with keys: a.b.c a.d.e b
listPrefixes() would return ["a", "b"]
-
getSubconfiguration
Description copied from interface:ConfigurationReturns configuration containing all keys starting with given prefix. Keys for returned configuration are stripped of this prefix.- Parameters:
keyPrefix- Prefix to search for- Returns:
- Configuration containing all keys starting with given prefix.
-