Class MppBaseConfig
java.lang.Object
org.apache.iotdb.it.env.cluster.config.MppBaseConfig
- Direct Known Subclasses:
MppCommonConfig,MppConfigNodeConfig,MppDataNodeConfig
This class stands for a config object of one single property file.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreate an empty MppPersistentConfig.protectedMppBaseConfig(String filePath) Create a MppPersistentConfig from the property file. -
Method Summary
Modifier and TypeMethodDescriptionabstract MppBaseConfigCreate an instance but with empty properties.final voidpersistent(String filePath) Persistent the properties to the file.protected final voidsetProperty(@NotNull String key, String value) Set a property with the input key and value.final voidupdateProperties(@NotNull Properties properties) Put all the key-value pairs of input properties to the current instance one.voidupdateProperties(@NotNull MppBaseConfig persistentConfig) Put all the properties of the input persistent config to the current instance.final voidupdateProperties(String filePath) Put all the properties of the input file to the current instance.
-
Field Details
-
NULL_VALUE
- See Also:
-
properties
-
-
Constructor Details
-
MppBaseConfig
protected MppBaseConfig()Create an empty MppPersistentConfig. -
MppBaseConfig
Create a MppPersistentConfig from the property file.- Parameters:
filePath- the property file path.- Throws:
IOException- if load properties failed.
-
-
Method Details
-
updateProperties
Put all the key-value pairs of input properties to the current instance one. If the key is existed in both, the value will be overridden.- Parameters:
properties- the properties to update with.
-
updateProperties
Put all the properties of the input persistent config to the current instance. If the key is existed in both, the value will be overridden.- Parameters:
persistentConfig- the config instance to update with.
-
updateProperties
Put all the properties of the input file to the current instance. If the key is existed in both, the value will be overridden.- Parameters:
filePath- the path of the properties file to update with. If it's null, then nothing will happen.- Throws:
IOException- there's some errors during processing the file.
-
persistent
Persistent the properties to the file.- Parameters:
filePath- the file path.- Throws:
IOException- if properties storage failed.
-
setProperty
Set a property with the input key and value. If the key is existed, the value will be overridden. If the value is an empty String, the key will be removed.- Parameters:
key- the key.value- the value.
-
emptyClone
Create an instance but with empty properties.
-