Update setting order

This commit is contained in:
JeremyStar™ 2024-07-23 19:51:00 +02:00
parent ae201f8729
commit 062b68a93b
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -143,6 +143,59 @@ public final class EngineConfiguration implements SubsystemConfiguration {
*/
private boolean errorShortcodeConverter;
/**
* If enabled, will makes the {@link Logger} work asynchronous, in a separate platform thread.
* Don't disable unless you want your application to run <b>extremely</b> slowly.
*
* @see EngineConfiguration#loggerPollingSpeed
* @see Thread
* @since v1-alpha0
*
* -- GETTER --
* Gets the value for {@link #optimizeLogging}.
*
* @return variable value
* @see EngineConfiguration#optimizeLogging
* @since v1-alpha0
*/
private boolean optimizeLogging;
/**
* If enabled, will make all events asynchronous, in separate virtual threads.
* Don't disable unless you want your application to run slower.
*
* @see VirtualThread
* @since v1-alpha0
*
* -- GETTER --
* Gets the value for {@link #optimizeEvents}.
*
* @return variable value
* @see EngineConfiguration#optimizeEvents
* @since v1-alpha0
*/
private boolean optimizeEvents;
/**
* If enabled, will try to automatically initialize every subsystem found though reflection.
* <p>
* This however may fail in certain situation, where manual subsystem initialization may be required.
* For this reason, this can be turned off before the engine initializes.
* Please note though that dependency resolution between subsystems will not be done, be careful when
* initializing subsystems manually.
*
* @see Engine
* @since v1-alpha2
*
* -- GETTER --
* Gets the value for {@link #optimizeSubsystemInitialization}.
*
* @return variable value
* @see EngineConfiguration#optimizeSubsystemInitialization
* @since v1-alpha2
*/
private boolean optimizeSubsystemInitialization;
/**
* Determines which logger levels are allowed by setting the minimum logger level.
*
@ -220,59 +273,6 @@ public final class EngineConfiguration implements SubsystemConfiguration {
*/
private int loggerPollingSpeed;
/**
* If enabled, will makes the {@link Logger} work asynchronous, in a separate platform thread.
* Don't disable unless you want your application to run <b>extremely</b> slowly.
*
* @see EngineConfiguration#loggerPollingSpeed
* @see Thread
* @since v1-alpha0
*
* -- GETTER --
* Gets the value for {@link #optimizeLogging}.
*
* @return variable value
* @see EngineConfiguration#optimizeLogging
* @since v1-alpha0
*/
private boolean optimizeLogging;
/**
* If enabled, will make all events asynchronous, in separate virtual threads.
* Don't disable unless you want your application to run slower.
*
* @see VirtualThread
* @since v1-alpha0
*
* -- GETTER --
* Gets the value for {@link #optimizeEvents}.
*
* @return variable value
* @see EngineConfiguration#optimizeEvents
* @since v1-alpha0
*/
private boolean optimizeEvents;
/**
* If enabled, will try to automatically initialize every subsystem found though reflection.
* <p>
* This however may fail in certain situation, where manual subsystem initialization may be required.
* For this reason, this can be turned off before the engine initializes.
* Please note though that dependency resolution between subsystems will not be done, be careful when
* initializing subsystems manually.
*
* @see Engine
* @since v1-alpha2
*
* -- GETTER --
* Gets the value for {@link #optimizeSubsystemInitialization}.
*
* @return variable value
* @see EngineConfiguration#optimizeSubsystemInitialization
* @since v1-alpha2
*/
private boolean optimizeSubsystemInitialization;
/**
* Constructs this class.
*
@ -313,6 +313,10 @@ public final class EngineConfiguration implements SubsystemConfiguration {
case "errorShortcodeConverter" -> errorShortcodeConverter = parser.getBoolean(group + property);
case "optimizeLogging" -> optimizeLogging = parser.getBoolean(group + property);
case "optimizeEvents" -> optimizeEvents = parser.getBoolean(group + property);
case "optimizeSubsystemInitialization" -> optimizeSubsystemInitialization = parser.getBoolean(group + property);
case "loggerLevel" -> {
try {
loggerLevel = LogLevel.valueOf(parser.getString(group + property).toUpperCase());
@ -324,10 +328,6 @@ public final class EngineConfiguration implements SubsystemConfiguration {
case "loggerImmediateShutdown" -> loggerImmediateShutdown = parser.getBoolean(group + property);
case "loggerForceStandardOutput" -> loggerForceStandardOutput = parser.getBoolean(group + property);
case "loggerPollingSpeed" -> loggerPollingSpeed = parser.getInteger(group + property, true);
case "optimizeLogging" -> optimizeLogging = parser.getBoolean(group + property);
case "optimizeEvents" -> optimizeEvents = parser.getBoolean(group + property);
case "optimizeSubsystemInitialization" -> optimizeSubsystemInitialization = parser.getBoolean(group + property);
}
} catch (NullPointerException ignored) {}
}
@ -352,15 +352,15 @@ public final class EngineConfiguration implements SubsystemConfiguration {
errorShortcodeConverter = true;
optimizeLogging = true;
optimizeEvents = true;
optimizeSubsystemInitialization = true;
loggerLevel = LogLevel.INFORMATIONAL;
loggerTemplate = "%log_color_primary%[%time_hour%:%time_minute%:%time_second%] [%log_level% %log_path%%log_info%] %log_color_secondary%%log_message%<reset>";
loggerImmediateShutdown = false;
loggerForceStandardOutput = false;
loggerPollingSpeed = 5;
optimizeLogging = true;
optimizeEvents = true;
optimizeSubsystemInitialization = true;
}
/** {@inheritDoc} */
@ -373,15 +373,15 @@ public final class EngineConfiguration implements SubsystemConfiguration {
case "errorShortcodeConverter" -> { return errorShortcodeConverter; }
case "optimizeLogging" -> { return optimizeLogging; }
case "optimizeEvents" -> { return optimizeEvents; }
case "optimizeSubsystemInitialization" -> { return optimizeSubsystemInitialization; }
case "loggerLevel" -> { return loggerLevel; }
case "loggerTemplate" -> { return loggerTemplate; }
case "loggerImmediateShutdown" -> { return loggerImmediateShutdown; }
case "loggerForceStandardOutput" -> { return loggerForceStandardOutput; }
case "loggerPollingSpeed" -> { return loggerPollingSpeed; }
case "optimizeLogging" -> { return optimizeLogging; }
case "optimizeEvents" -> { return optimizeEvents; }
case "optimizeSubsystemInitialization" -> { return optimizeSubsystemInitialization; }
default -> { return null; }
}
}