Class RuntimeConfServiceImpl

  • All Implemented Interfaces:
    pro.fessional.wings.silencer.enhance.ThisLazyAware , pro.fessional.wings.warlock.service.conf.RuntimeConfService

    @CacheConfig(cacheNames = "service~RuntimeConfService!", cacheManager = "MemoryCacheManager") 
    public class RuntimeConfServiceImpl
    extends ThisLazy<T> implements RuntimeConfService
                        
    Since:

    2022-03-09

    Author:

    trydofor

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      void putHandler(@NotNull() String type, @NotNull() ConversionService handler)
      <T> T getObject(@NotNull() String key, @NotNull() TypeDescriptor type) Read the value of config by type
      boolean setObject(@NotNull() String key, @NotNull() Object value) set value of config, return false if not found
      boolean newObject(@NotNull() String key, @NotNull() Object value, String comment, String handler, ResolvableType structs) create new config, return true if handled
      boolean enable(@NotNull() String key, boolean enable) enable/disable the config, success or throw an error.
      <T> T getObjectCache(@NotNull() String key, @NotNull() TypeDescriptor type)
      boolean evictAllConfCache(TableChangeEvent event)
      void setWinConfRuntimeDao(WinConfRuntimeDao winConfRuntimeDao)
      void setWingsTableCudHandler(WingsTableCudHandler wingsTableCudHandler)
      • Methods inherited from class pro.fessional.wings.silencer.enhance.ThisLazy

        setThisLazy
      • Methods inherited from class pro.fessional.wings.warlock.service.conf.RuntimeConfService

        enable, enable, getBoolean, getBoolean, getBoolean, getEnum, getEnums, getInt, getInt, getInt, getList, getList, getList, getLong, getLong, getLong, getMap, getMap, getMap, getObject, getObject, getSet, getSet, getSet, getSimple, getSimple, getSimple, getString, getString, getString, newObject, newObject, newObject, newObject, newObject, newObject, newObject, newObject, newObject, newObject, newObject, newObject, newObject, newObject, setObject, setObject
      • Methods inherited from class pro.fessional.wings.silencer.enhance.ThisLazyAware

        thisLazyType
      • Methods inherited from class java.lang.Object

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

      • RuntimeConfServiceImpl

        RuntimeConfServiceImpl()
    • Method Detail

      • putHandler

         void putHandler(@NotNull() String type, @NotNull() ConversionService handler)
      • getObject

         <T> T getObject(@NotNull() String key, @NotNull() TypeDescriptor type)

        Read the value of config by type

        Parameters:
        key - key
        type - type descriptor
        Returns:

        value

      • setObject

         boolean setObject(@NotNull() String key, @NotNull() Object value)

        set value of config, return false if not found

        Parameters:
        key - key
        value - config
      • newObject

         boolean newObject(@NotNull() String key, @NotNull() Object value, String comment, String handler, ResolvableType structs)

        create new config, return true if handled

        Parameters:
        key - config key
        value - config value
        comment - config comment, empty if null
        handler - type handler name, auto select if null
        Returns:

        whether handled

      • enable

         boolean enable(@NotNull() String key, boolean enable)

        enable/disable the config, success or throw an error.

      • getObjectCache

        @Cacheable() <T> T getObjectCache(@NotNull() String key, @NotNull() TypeDescriptor type)