Record Class Config
java.lang.Object
java.lang.Record
net.flectone.pulse.config.Config
public record Config(String server, String version, Config.Language language, Config.Database database, Config.Executor executor, Config.Proxy proxy, Config.Internal internal, Config.DeprecatedCommand command, Config.DeprecatedModule module, Config.Logger logger, Config.Cache cache, Config.Metrics metrics)
extends Record
Configuration for the FlectonePulse.
Contains all top-level configuration sections and settings.
- Since:
- 1.7.1
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic classstatic final recordstatic final recordDeprecated, for removal: This API element is subject to removal in a future version.static final recordDeprecated, for removal: This API element is subject to removal in a future version.static final recordstatic final recordstatic final recordstatic final recordstatic final recordstatic final record -
Constructor Summary
ConstructorsConstructorDescriptionConfig(String server, String version, Config.Language language, Config.Database database, Config.Executor executor, Config.Proxy proxy, Config.Internal internal, Config.DeprecatedCommand command, Config.DeprecatedModule module, Config.Logger logger, Config.Cache cache, Config.Metrics metrics) Creates an instance of aConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic Config.ConfigBuilderbuilder()cache()Returns the value of thecacherecord component.command()Deprecated, for removal: This API element is subject to removal in a future version.database()Returns the value of thedatabaserecord component.final booleanIndicates whether some other object is "equal to" this one.executor()Returns the value of theexecutorrecord component.final inthashCode()Returns a hash code value for this object.internal()Returns the value of theinternalrecord component.language()Returns the value of thelanguagerecord component.logger()Returns the value of theloggerrecord component.metrics()Returns the value of themetricsrecord component.module()Deprecated, for removal: This API element is subject to removal in a future version.proxy()Returns the value of theproxyrecord component.server()Returns the value of theserverrecord component.final StringtoString()Returns a string representation of this record class.version()Returns the value of theversionrecord component.withCache(Config.Cache cache) withCommand(Config.DeprecatedCommand command) Deprecated.withDatabase(Config.Database database) withExecutor(Config.Executor executor) withInternal(Config.Internal internal) withLanguage(Config.Language language) withLogger(Config.Logger logger) withMetrics(Config.Metrics metrics) withModule(Config.DeprecatedModule module) Deprecated.withProxy(Config.Proxy proxy) withServer(String server) withVersion(String version)
-
Constructor Details
-
Config
public Config(@JsonPropertyDescription(" Don't change it if you don't know what it is") String server, String version, @JsonPropertyDescription(" https://flectone.net/pulse/docs/config/language") Config.Language language, @JsonPropertyDescription(" https://flectone.net/pulse/docs/config/database") Config.Database database, @JsonPropertyDescription(" https://flectone.net/pulse/docs/config/executor") Config.Executor executor, @JsonPropertyDescription(" https://flectone.net/pulse/docs/config/proxy") Config.Proxy proxy, @JsonPropertyDescription(" https://flectone.net/pulse/docs/config/internal") Config.Internal internal, @Deprecated(forRemoval=true) Config.DeprecatedCommand command, @Deprecated(forRemoval=true) Config.DeprecatedModule module, @JsonPropertyDescription("https://flectone.net/pulse/docs/config/logger") Config.Logger logger, @JsonPropertyDescription("https://flectone.net/pulse/docs/config/cache") Config.Cache cache, @JsonPropertyDescription("Help us improve FlectonePulse! This collects basic, anonymous data like server version and module usage. \nNo personal data, No IPs, No player names. \nThis helps us understand what features matter most and focus development where it's needed. \nYou can see the public stats here: https://flectone.net/pulse/docs/metrics/ \nThanks for supporting the project! \u2764\ufe0f") Config.Metrics metrics) Creates an instance of aConfigrecord class.- Parameters:
server- the value for theserverrecord componentversion- the value for theversionrecord componentlanguage- the value for thelanguagerecord componentdatabase- the value for thedatabaserecord componentexecutor- the value for theexecutorrecord componentproxy- the value for theproxyrecord componentinternal- the value for theinternalrecord componentcommand- the value for thecommandrecord componentmodule- the value for themodulerecord componentlogger- the value for theloggerrecord componentcache- the value for thecacherecord componentmetrics- the value for themetricsrecord component
-
-
Method Details
-
builder
-
toBuilder
-
withServer
-
withVersion
-
withLanguage
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withDatabase
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withExecutor
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withProxy
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withInternal
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withCommand
Deprecated.- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withModule
Deprecated.- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withLogger
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withCache
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withMetrics
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
server
Returns the value of theserverrecord component.- Returns:
- the value of the
serverrecord component
-
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
language
@JsonPropertyDescription(" https://flectone.net/pulse/docs/config/language") public Config.Language language()Returns the value of thelanguagerecord component.- Returns:
- the value of the
languagerecord component
-
database
@JsonPropertyDescription(" https://flectone.net/pulse/docs/config/database") public Config.Database database()Returns the value of thedatabaserecord component.- Returns:
- the value of the
databaserecord component
-
executor
@JsonPropertyDescription(" https://flectone.net/pulse/docs/config/executor") public Config.Executor executor()Returns the value of theexecutorrecord component.- Returns:
- the value of the
executorrecord component
-
proxy
@JsonPropertyDescription(" https://flectone.net/pulse/docs/config/proxy") public Config.Proxy proxy()Returns the value of theproxyrecord component.- Returns:
- the value of the
proxyrecord component
-
internal
@JsonPropertyDescription(" https://flectone.net/pulse/docs/config/internal") public Config.Internal internal()Returns the value of theinternalrecord component.- Returns:
- the value of the
internalrecord component
-
command
Deprecated, for removal: This API element is subject to removal in a future version.Returns the value of thecommandrecord component.- Returns:
- the value of the
commandrecord component
-
module
Deprecated, for removal: This API element is subject to removal in a future version.Returns the value of themodulerecord component.- Returns:
- the value of the
modulerecord component
-
logger
@JsonPropertyDescription("https://flectone.net/pulse/docs/config/logger") public Config.Logger logger()Returns the value of theloggerrecord component.- Returns:
- the value of the
loggerrecord component
-
cache
@JsonPropertyDescription("https://flectone.net/pulse/docs/config/cache") public Config.Cache cache()Returns the value of thecacherecord component.- Returns:
- the value of the
cacherecord component
-
metrics
@JsonPropertyDescription("Help us improve FlectonePulse! This collects basic, anonymous data like server version and module usage. \nNo personal data, No IPs, No player names. \nThis helps us understand what features matter most and focus development where it's needed. \nYou can see the public stats here: https://flectone.net/pulse/docs/metrics/ \nThanks for supporting the project! \u2764\ufe0f") public Config.Metrics metrics()Returns the value of themetricsrecord component.- Returns:
- the value of the
metricsrecord component
-