Class MapConfigSourceBuilder


  • public final class MapConfigSourceBuilder
    extends SourceBuilder<MapConfigSourceBuilder,​MapConfigSource>
    ConfigSourceBuilder for the Map Config Source.

    Allows a user to provide a custom config source as a map. would take the same form as a property file with a key that can be tokenized and a value. db.port = 1234 db.password = password dp.user = notroot

    • Method Detail

      • builder

        public static MapConfigSourceBuilder builder()
        Static function to create the builder.
        Returns:
        the builder
      • getCustomConfig

        public java.util.Map<java.lang.String,​java.lang.String> getCustomConfig()
        Get the map that backs the config source.
        Returns:
        the map that backs the config source.
      • setCustomConfig

        public MapConfigSourceBuilder setCustomConfig​(java.util.Map<java.lang.String,​java.lang.String> customConfig)
        Set the map that backs the config source.
        Parameters:
        customConfig - the map that backs the config source.
        Returns:
        the builder
      • addCustomConfig

        public MapConfigSourceBuilder addCustomConfig​(java.lang.String path,
                                                      java.lang.String value)
        Add a new configuration with a path and a value.
        Parameters:
        path - the path for the configuration
        value - the value for the configuration.
        Returns:
        the builder