Class ConfigStoreOptions


  • public class ConfigStoreOptions
    extends Object
    Data object representing the configuration of a configuration store. This object describes the configuration of a chunk of configuration that you retrieve. It specifies its type (type of configuration store), the format of the retrieved configuration chunk, and you can also configures the store if it needs configuration to retrieve the configuration chunk.
    Author:
    Clement Escoffier
    • Constructor Detail

      • ConfigStoreOptions

        public ConfigStoreOptions()
      • ConfigStoreOptions

        public ConfigStoreOptions​(JsonObject json)
    • Method Detail

      • getType

        public String getType()
        Returns:
        the configuration type, it specified from which store the configuration is coming.
      • getConfig

        public JsonObject getConfig()
        Returns:
        the configuration of the store, may be null if not needed.
      • getFormat

        public String getFormat()
        Returns:
        the format of the configuration that is retrieved from the store.
      • isOptional

        public boolean isOptional()
        Returns:
        whether or not the store is considered as optional. When the configuration is retrieve, if an optional store returns a failure, the failure is ignored and an empty json object is used instead (for this store). The default value is false.
      • setOptional

        public ConfigStoreOptions setOptional​(boolean optional)
        Sets whether or not the store is optional. When the configuration is retrieve, if an optional store returns a failure, the failure is ignored and an empty json object is used instead (for this store).
        Parameters:
        optional - whether or not the store is optional.
        Returns:
        the current instance of ConfigStoreOptions
      • setFormat

        public ConfigStoreOptions setFormat​(String format)
        Sets the format of the configuration that is retrieved from the store.
        Parameters:
        format - the format, must not be null.
        Returns:
        the current instance of ConfigStoreOptions