Contents
- Description
- Field Summary
- Constructor Summary
- Method Summary
- Field Details
- Constructor Details
- Method Details
- setHytaleServerConfig(HytaleServerConfig)
- isEnabled()
- getEnabledConfig()
- setEnabled(boolean)
- getFrequencyMinutes()
- getFrequencyMinutesConfig()
- setFrequencyMinutes(int)
- getDirectory()
- getDirectoryConfig()
- setDirectory(String)
- getMaxCount()
- getMaxCountConfig()
- setMaxCount(int)
- getArchiveMaxCount()
- getArchiveMaxCountConfig()
- setArchiveMaxCount(int)
- isConfigured()
Class BackupConfig
java.lang.Object
com.hypixel.hytale.server.core.config.BackupConfig
Configuration for automatic world backups.
Settings can be overridden by command-line options (Options take priority).
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<BackupConfig> static final intDefault maximum number of archived backups to retain.static final intDefault backup frequency in minutes.static final intDefault maximum number of recent backups to retain. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the maximum number of archived backups to retain.Returns the raw archive max count from config, ignoring CLI.Returns the backup directory path.Returns the raw directory string from config, ignoring CLI.Returns the raw enabled state from config, ignoring CLI.intReturns the backup frequency in minutes.Returns the raw frequency from config, ignoring CLI.intReturns the maximum number of recent backups to retain.Returns the raw max count from config, ignoring CLI.booleanChecks if backups are properly configured (enabled with a valid directory).booleanReturns whether automatic backups are enabled.voidsetArchiveMaxCount(int archiveMaxCount) Sets the maximum number of archived backups to retain.voidsetDirectory(String directory) Sets the backup directory path.voidsetEnabled(boolean enabled) Sets whether automatic backups are enabled.voidsetFrequencyMinutes(int frequencyMinutes) Sets the backup frequency in minutes.voidsetHytaleServerConfig(HytaleServerConfig hytaleServerConfig) voidsetMaxCount(int maxCount) Sets the maximum number of recent backups to retain.
-
Field Details
-
DEFAULT_FREQUENCY_MINUTES
public static final int DEFAULT_FREQUENCY_MINUTESDefault backup frequency in minutes.- See Also:
-
DEFAULT_MAX_COUNT
public static final int DEFAULT_MAX_COUNTDefault maximum number of recent backups to retain.- See Also:
-
DEFAULT_ARCHIVE_MAX_COUNT
public static final int DEFAULT_ARCHIVE_MAX_COUNTDefault maximum number of archived backups to retain.- See Also:
-
CODEC
-
-
Constructor Details
-
BackupConfig
public BackupConfig() -
BackupConfig
-
-
Method Details
-
setHytaleServerConfig
-
isEnabled
public boolean isEnabled()Returns whether automatic backups are enabled.Command-line option takes priority over config value.
- Returns:
trueif backups are enabled,falseotherwise.
-
getEnabledConfig
Returns the raw enabled state from config, ignoring CLI.- Returns:
- the config enabled state, or
nullif not set.
-
setEnabled
public void setEnabled(boolean enabled) Sets whether automatic backups are enabled.- Parameters:
enabled- the enabled state to set.
-
getFrequencyMinutes
public int getFrequencyMinutes()Returns the backup frequency in minutes.Command-line option takes priority over config value.
- Returns:
- the backup frequency in minutes.
-
getFrequencyMinutesConfig
Returns the raw frequency from config, ignoring CLI.- Returns:
- the config frequency, or
nullif not set.
-
setFrequencyMinutes
public void setFrequencyMinutes(int frequencyMinutes) Sets the backup frequency in minutes.- Parameters:
frequencyMinutes- the frequency to set.
-
getDirectory
Returns the backup directory path.Command-line option takes priority over config value.
- Returns:
- the backup directory path, or
nullif not configured.
-
getDirectoryConfig
Returns the raw directory string from config, ignoring CLI.- Returns:
- the config directory, or
nullif not set.
-
setDirectory
Sets the backup directory path.- Parameters:
directory- the directory to set.
-
getMaxCount
public int getMaxCount()Returns the maximum number of recent backups to retain.Command-line option takes priority over config value.
- Returns:
- the maximum backup count.
-
getMaxCountConfig
Returns the raw max count from config, ignoring CLI.- Returns:
- the config max count, or
nullif not set.
-
setMaxCount
public void setMaxCount(int maxCount) Sets the maximum number of recent backups to retain.- Parameters:
maxCount- the max count to set.
-
getArchiveMaxCount
public int getArchiveMaxCount()Returns the maximum number of archived backups to retain.Command-line option takes priority over config value.
- Returns:
- the maximum archive count.
-
getArchiveMaxCountConfig
Returns the raw archive max count from config, ignoring CLI.- Returns:
- the config archive max count, or
nullif not set.
-
setArchiveMaxCount
public void setArchiveMaxCount(int archiveMaxCount) Sets the maximum number of archived backups to retain.- Parameters:
archiveMaxCount- the archive max count to set.
-
isConfigured
public boolean isConfigured()Checks if backups are properly configured (enabled with a valid directory).- Returns:
trueif backups can be performed,falseotherwise.
-