public class PersistentServerConfigWrapper extends Object implements IServerConfigWrapper
| Constructor and Description |
|---|
PersistentServerConfigWrapper(@NonNull Path configFile,
@NonNull ServerConfiguration serverConfiguration)
Create or update configuration with the one provided
|
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
|
PersistentServerConfigWrapper(@NonNull Path configFile,
@NonNull String defaultName,
@NonNull UUID serverUUID)
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 unable to create and or save the configurationpublic PersistentServerConfigWrapper(@NonNull
@NonNull Path configFile,
@NonNull
@NonNull ServerConfiguration serverConfiguration)
throws IOException
configFile - The path to the config fileserverConfiguration - The server configuration to create and or saveIOException - if unable to create and or save the configurationpublic PersistentServerConfigWrapper(@NonNull
@NonNull Path configFile,
@NonNull
@NonNull String defaultName,
@NonNull
@NonNull UUID serverUUID)
throws IOException
configFile - The path to the config filedefaultName - The default name to use in case the config does not exist or is invalidserverUUID - The server UUID to setIOException - if unable to create and or save the configurationpublic 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.