Class JsonBackedConfigElement
java.lang.Object
io.nosqlbench.nb.api.config.params.JsonBackedConfigElement
- All Implemented Interfaces:
ElementData
-
Field Summary
Fields inherited from interface io.nosqlbench.nb.api.config.params.ElementData
COMMON_TYPES, NAME -
Constructor Summary
ConstructorsConstructorDescriptionJsonBackedConfigElement(String injectedName, com.google.gson.JsonObject jsonObject) -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsKey(String name) <T> TgetAsCommon(String key) Get the value for the key, but ensure that the type of value that is returned is in one of the sanctionedElementData.COMMON_TYPES.getKeys()toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.nosqlbench.nb.api.config.params.ElementData
get, getName, lookup
-
Constructor Details
-
JsonBackedConfigElement
-
-
Method Details
-
get
- Specified by:
getin interfaceElementData
-
getKeys
- Specified by:
getKeysin interfaceElementData
-
containsKey
- Specified by:
containsKeyin interfaceElementData
-
getGivenName
- Specified by:
getGivenNamein interfaceElementData
-
convert
- Specified by:
convertin interfaceElementData
-
getAsCommon
Description copied from interface:ElementDataGet the value for the key, but ensure that the type of value that is returned is in one of the sanctioned
ElementData.COMMON_TYPES.If possible, the value provided should be a wrapper type around the actual backing type, such that mutability is preserved.
If the backing type is a structured type object graph which defies direct conversion to one of the types above, then an error should be thrown.
If the type is a collection type, then type conversion should be provided all the way down to each primitive value.
If no value by the given name exists, the null should be returned.
- Specified by:
getAsCommonin interfaceElementData- Parameters:
key- The key of the value to retrieve- Returns:
- The value as a Java primitive, Boxed primitive, or Set, List, or Map of String to Object.
-
toCommon
-
toString
-
extractElementName
- Specified by:
extractElementNamein interfaceElementData
-