Package ai.platon.pulsar.common.config
Class KConfiguration
-
- All Implemented Interfaces:
-
kotlin.collections.Iterable
public final class KConfiguration implements Iterable<Map.Entry<String, String>>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classKConfiguration.Companion
-
Field Summary
Fields Modifier and Type Field Description private final Integeridprivate final List<String>loadedResourcesprivate final Stringprofileprivate final Stringmodeprivate final Iterable<String>extraResourcespublic final static KConfiguration.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description KConfiguration(KConfiguration conf)KConfiguration(String profile, String mode, Iterable<String> extraResources, Boolean loadDefaults)
-
Method Summary
Modifier and Type Method Description final IntegergetId()final List<String>getLoadedResources()final StringgetProfile()The profile of the configuration. final StringgetMode()final Iterable<String>getExtraResources()The extra resources to load. final Unitset(String name, String value)Set the valueof thenameproperty.final Unitunset(String name)final Stringget(String name)final Stringget(String name, String defaultValue)final UnitsetStrings(String name, String values)final UnitsetIfUnset(String name, String value)final Integersize()Return the number of keys in the configuration. final Unitclear()Clears all keys from the configuration. Iterator<Entry.Map<String, String>>iterator()final UnitreloadConfiguration()StringtoString()-
-
Method Detail
-
getLoadedResources
final List<String> getLoadedResources()
-
getProfile
final String getProfile()
The profile of the configuration.
-
getExtraResources
final Iterable<String> getExtraResources()
The extra resources to load.
-
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.
-
setStrings
final Unit setStrings(String name, String values)
-
setIfUnset
final Unit setIfUnset(String name, String value)
-
size
final Integer size()
Return the number of keys in the configuration.
- Returns:
number of keys in the configuration.
-
reloadConfiguration
@Synchronized() final Unit reloadConfiguration()
-
-
-
-