public class PersistentServerConfigWrapper extends Object implements IServerConfigWrapper
| Constructor and Description |
|---|
PersistentServerConfigWrapper(@NonNull Path configFile,
@NonNull String defaultName)
If present and valid, the config specified will be used
Otherwise it will be created and filled with default generated config
|
| Modifier and Type | Method and Description |
|---|---|
ServerConfiguration |
getCacheConfig() |
void |
setConfig(@NonNull ServerConfiguration serverConfiguration)
Set and save a new configuration
|
public PersistentServerConfigWrapper(@NonNull @NonNull Path configFile, @NonNull @NonNull String defaultName) throws IOException
configFile - The path to the config filedefaultName - The default name to use in case the config does not exist or is invalidIOException - If config does not exist and we can't save the default generated configpublic ServerConfiguration getCacheConfig()
getCacheConfig in interface IServerConfigWrapperpublic void setConfig(@NonNull @NonNull ServerConfiguration serverConfiguration) throws IOException
setConfig in interface IServerConfigWrapperserverConfiguration - A non null configuration to setIOException - If unable to save the new configurationCopyright © 2022 SiLA Java Developers. All rights reserved.