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(String type, ConversionService handler)
      <T> T getObject(String key, TypeDescriptor type) Read the value of config by type
      void setObject(String key, Object value) set value of config
      boolean newObject(String key, Object value, String comment, String handler) create new config
      boolean newObject(String key, Object value, String comment) create new config with auto selected handler, success or throw an error.
      <T> T getObjectCache(String key, 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

        getBoolean, getBoolean, getBoolean, getEnum, getEnums, getInt, getInt, getInt, getList, getList, getList, getLong, getLong, getLong, getMap, getMap, getMap, getObject, getObject, getSimple, getSimple, getSimple, getString, getString, getString, newObject, newObject, newObject, newObject, setObject, setObject
      • Methods inherited from class java.lang.Object

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

      • RuntimeConfServiceImpl

        RuntimeConfServiceImpl()
    • Method Detail

      • getObject

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

        Read the value of config by type

        Parameters:
        key - key
        type - type descriptor
        Returns:

        value

      • setObject

         void setObject(String key, Object value)

        set value of config

        Parameters:
        key - key
        value - config
      • newObject

         boolean newObject(String key, Object value, String comment, String handler)

        create new config

        Parameters:
        key - config key
        value - config value
        comment - config comment
        handler - type handler name
        Returns:

        whether handled

      • newObject

         boolean newObject(String key, Object value, String comment)

        create new config with auto selected handler, success or throw an error.

        Parameters:
        key - config key
        value - config value
        comment - config comment