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.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
  • 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, @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/metrics/ \nThanks for supporting the project! \u2764\ufe0f") Config.Metrics metrics)
      Creates an instance of a Config record class.
      Parameters:
      server - the value for the server record component
      version - the value for the version record component
      language - the value for the language record component
      database - the value for the database record component
      executor - the value for the executor record component
      proxy - the value for the proxy record component
      internal - the value for the internal record component
      logger - the value for the logger record component
      cache - the value for the cache record component
      metrics - the value for the metrics record component
  • Method Details

    • builder

      public static Config.ConfigBuilder builder()
    • toBuilder

      public Config.ConfigBuilder toBuilder()
    • withServer

      public Config withServer(String server)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withVersion

      public Config withVersion(String version)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withLanguage

      public Config withLanguage(Config.Language language)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withDatabase

      public Config withDatabase(Config.Database database)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withExecutor

      public Config withExecutor(Config.Executor executor)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withProxy

      public Config withProxy(Config.Proxy proxy)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withInternal

      public Config withInternal(Config.Internal internal)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withLogger

      public Config withLogger(Config.Logger logger)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withCache

      public Config withCache(Config.Cache cache)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • withMetrics

      public Config withMetrics(Config.Metrics metrics)
      Returns:
      a clone of this object, except with this updated property (returns this if an identical value is passed).
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • server

      @JsonPropertyDescription(" Don't change it if you don't know what it is") public String server()
      Returns the value of the server record component.
      Returns:
      the value of the server record component
    • version

      public String version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component
    • language

      @JsonPropertyDescription(" https://flectone.net/pulse/docs/config/language") public Config.Language language()
      Returns the value of the language record component.
      Returns:
      the value of the language record component
    • database

      @JsonPropertyDescription(" https://flectone.net/pulse/docs/config/database") public Config.Database database()
      Returns the value of the database record component.
      Returns:
      the value of the database record component
    • executor

      @JsonPropertyDescription(" https://flectone.net/pulse/docs/config/executor") public Config.Executor executor()
      Returns the value of the executor record component.
      Returns:
      the value of the executor record component
    • proxy

      @JsonPropertyDescription(" https://flectone.net/pulse/docs/config/proxy") public Config.Proxy proxy()
      Returns the value of the proxy record component.
      Returns:
      the value of the proxy record component
    • internal

      @JsonPropertyDescription(" https://flectone.net/pulse/docs/config/internal") public Config.Internal internal()
      Returns the value of the internal record component.
      Returns:
      the value of the internal record component
    • logger

      @JsonPropertyDescription("https://flectone.net/pulse/docs/config/logger") public Config.Logger logger()
      Returns the value of the logger record component.
      Returns:
      the value of the logger record component
    • cache

      @JsonPropertyDescription("https://flectone.net/pulse/docs/config/cache") public Config.Cache cache()
      Returns the value of the cache record component.
      Returns:
      the value of the cache record 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/metrics/ \nThanks for supporting the project! \u2764\ufe0f") public Config.Metrics metrics()
      Returns the value of the metrics record component.
      Returns:
      the value of the metrics record component