Object ConfigComponent

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Unit start() Starts the ConfigComponent, fetching configs from the database and network if necessary.
      final Unit onAccountIdChanged() Clears the config table when the account ID changes.
      final <T extends Config> T getConfig() Retrieves the configuration of the specified type from the cache, or returns the default config if not present.
      final <T extends Config> T getConfig(Class<T> clazz) Retrieves the configuration of the specified type from the cache, or returns the default config if not present.
      final Unit attachListener(String type, ConfigUpdateListener listener) Attaches a ConfigUpdateListener for the specified config type.
      final Unit clear()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • start

         final Unit start()

        Starts the ConfigComponent, fetching configs from the database and network if necessary.

      • getConfig

         final <T extends Config> T getConfig()

        Retrieves the configuration of the specified type from the cache, or returns the default config if not present.

      • getConfig

         final <T extends Config> T getConfig(Class<T> clazz)

        Retrieves the configuration of the specified type from the cache, or returns the default config if not present.