Class ConfigStoreOptions
java.lang.Object
io.vertx.config.ConfigStoreOptions
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetType()booleansetConfig(JsonObject config) Sets the configuration of the storeSets the format of the configuration that is retrieved from the store.setOptional(boolean optional) Sets whether or not the store is optional.Sets the configuration typetoJson()
-
Constructor Details
-
ConfigStoreOptions
public ConfigStoreOptions() -
ConfigStoreOptions
-
ConfigStoreOptions
-
-
Method Details
-
toJson
-
getType
- Returns:
- the configuration type, it specified from which store the configuration is coming.
-
setType
Sets the configuration type- Parameters:
type- the type- Returns:
- the current instance of
ConfigStoreOptions
-
getConfig
- Returns:
- the configuration of the store, may be
nullif not needed.
-
setConfig
Sets the configuration of the store- Parameters:
config- the data, can benull- Returns:
- the current instance of
ConfigStoreOptions
-
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
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
Sets the format of the configuration that is retrieved from the store.- Parameters:
format- the format, must not benull.- Returns:
- the current instance of
ConfigStoreOptions
-