public class PersistentServerConfigWrapper extends Object implements IServerConfigWrapper
| Constructor and Description |
|---|
PersistentServerConfigWrapper(Path configFile,
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(ServerConfiguration serverConfiguration)
Set and save a new configuration
|
public PersistentServerConfigWrapper(@NonNull
Path configFile,
@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
ServerConfiguration serverConfiguration)
throws IOException
setConfig in interface IServerConfigWrapperserverConfiguration - A non null configuration to setIOException - If unable to save the new configurationCopyright © 2019. All rights reserved.