-
public class MutableConfig extends ImmutableConfig
MutableConfig class.
-
-
Constructor Summary
Constructors Constructor Description MutableConfig()MutableConfig(String profile)MutableConfig(Boolean loadDefaults)MutableConfig(String profile, Boolean loadDefaults, Iterable<String> resources)MutableConfig(ImmutableConfig conf)
-
Method Summary
Modifier and Type Method Description final StringgetName()final UnitsetName(String name)final StringgetProfile()final UnitsetProfile(String profile)final StringgetMode()final EnvironmentgetEnvironment()Spring core is the first class dependency now, we will remove dependency on KConfiguration later final UnitsetEnvironment(Environment environment)Spring core is the first class dependency now, we will remove dependency on KConfiguration later final BooleangetIsDryRun()final BooleangetIsDistributedFs()final Unitset(String name, String value)Set the valueof thenameproperty.final UnitsetIfNotNull(String name, String value)setIfNotNull. final UnitsetIfNotEmpty(String name, String value)setIfNotEmpty. final StringgetAndSet(String name, String value)getAndSet. final StringgetAndUnset(String name)getAndUnset. final UnitsetStrings(String name, String values)Set the array of string values for the nameproperty as as comma delimited values.final UnitsetInt(String name, Integer value)Set the value of the nameproperty to anint.final UnitsetLong(String name, Long value)Set the value of the nameproperty to along.final UnitsetFloat(String name, Float value)Set the value of the nameproperty to afloat.final UnitsetDouble(String name, Double value)Set the value of the nameproperty to adouble.final UnitsetBoolean(String name, Boolean value)Set the value of the nameproperty to aboolean.final UnitsetBooleanIfUnset(String name, Boolean value)Set the given property, if it is currently unset. final <T extends Enum<T>> UnitsetEnum(String name, T value)Set the value of the nameproperty to the given type.final UnitsetInstant(String name, Instant time)setInstant. final UnitsetDuration(String name, Duration duration)setDuration. final Unitunset(String name)unset. final Unitclear()clear. final Unitreset(KConfiguration conf)reset. final Unitmerge(KConfiguration conf, String names)merge. VolatileConfigtoVolatileConfig()toVolatileConfig. -
Methods inherited from class ai.platon.pulsar.common.config.MutableConfig
toMutableConfig -
Methods inherited from class ai.platon.pulsar.common.config.ImmutableConfig
get, get, getBoolean, getClass, getClass, getConfResourceAsInputStream, getConfResourceAsReader, getDouble, getDuration, getDuration, getEnum, getFloat, getInstant, getInt, getInts, getKvs, getLong, getPath, getPathOrNull, getResource, getStringCollection, getStrings, getStrings, getTrimmedStringCollection, getTrimmedStrings, getTrimmedStrings, getUint, getUlong, size, toString, unbox -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getProfile
final String getProfile()
-
setProfile
final Unit setProfile(String profile)
-
getEnvironment
final Environment getEnvironment()
Spring core is the first class dependency now, we will remove dependency on KConfiguration later
-
setEnvironment
final Unit setEnvironment(Environment environment)
Spring core is the first class dependency now, we will remove dependency on KConfiguration later
-
getIsDryRun
final Boolean getIsDryRun()
-
getIsDistributedFs
final Boolean getIsDistributedFs()
-
set
final Unit set(String name, String value)
Set the
valueof thenameproperty. Ifnameis deprecated or there is a deprecated name associated to it, it sets the value to both names. Name will be trimmed before put into configuration.- Parameters:
name- property name.value- property value.
-
setIfNotNull
final Unit setIfNotNull(String name, String value)
setIfNotNull.
- Parameters:
name- a java.lang.String object.value- a java.lang.String object.
-
setIfNotEmpty
final Unit setIfNotEmpty(String name, String value)
setIfNotEmpty.
- Parameters:
name- a java.lang.String object.value- a java.lang.String object.
-
getAndSet
final String getAndSet(String name, String value)
getAndSet.
- Parameters:
name- a java.lang.String object.value- a java.lang.String object.
-
getAndUnset
final String getAndUnset(String name)
getAndUnset.
- Parameters:
name- a java.lang.String object.
-
setStrings
final Unit setStrings(String name, String values)
Set the array of string values for the
nameproperty as as comma delimited values.- Parameters:
name- property name.values- The values
-
setInt
final Unit setInt(String name, Integer value)
Set the value of the
nameproperty to anint.- Parameters:
name- property name.value-intvalue of the property.
-
setLong
final Unit setLong(String name, Long value)
Set the value of the
nameproperty to along.- Parameters:
name- property name.value-longvalue of the property.
-
setFloat
final Unit setFloat(String name, Float value)
Set the value of the
nameproperty to afloat.- Parameters:
name- property name.value- property value.
-
setDouble
final Unit setDouble(String name, Double value)
Set the value of the
nameproperty to adouble.- Parameters:
name- property name.value- property value.
-
setBoolean
final Unit setBoolean(String name, Boolean value)
Set the value of the
nameproperty to aboolean.- Parameters:
name- property name.value-booleanvalue of the property.
-
setBooleanIfUnset
final Unit setBooleanIfUnset(String name, Boolean value)
Set the given property, if it is currently unset.
- Parameters:
name- property namevalue- new value
-
setEnum
final <T extends Enum<T>> Unit setEnum(String name, T value)
Set the value of the
nameproperty to the given type. This is equivalent toset(<name>, value.toString()).- Parameters:
name- property namevalue- new value
-
setInstant
final Unit setInstant(String name, Instant time)
setInstant.
- Parameters:
name- a java.lang.String object.time- a java.time.Instant object.
-
setDuration
final Unit setDuration(String name, Duration duration)
setDuration.
- Parameters:
name- a java.lang.String object.duration- a java.time.Duration object.
-
unset
final Unit unset(String name)
unset.
- Parameters:
name- a java.lang.String object.
-
reset
final Unit reset(KConfiguration conf)
reset.
-
merge
final Unit merge(KConfiguration conf, String names)
merge.
- Parameters:
names- a java.lang.String object.
-
toVolatileConfig
VolatileConfig toVolatileConfig()
toVolatileConfig.
-
-
-
-