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
trydofor
-
-
Field Summary
Fields Modifier and Type Field Description public final static StringPropHandlerpublic final static StringJsonHandlerpublic final static StringKryoHandler
-
Constructor Summary
Constructors Constructor Description RuntimeConfServiceImpl()
-
Method Summary
Modifier and Type Method Description voidputHandler(String type, ConversionService handler)<T> TgetObject(String key, TypeDescriptor type)Read the value of config by type voidsetObject(String key, Object value)set value of config booleannewObject(String key, Object value, String comment, String handler)create new config booleannewObject(String key, Object value, String comment)create new config with auto selected handler, success or throw an error. <T> TgetObjectCache(String key, TypeDescriptor type)booleanevictAllConfCache(TableChangeEvent event)voidsetWinConfRuntimeDao(WinConfRuntimeDao winConfRuntimeDao)voidsetWingsTableCudHandler(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
-
-
Method Detail
-
putHandler
void putHandler(String type, ConversionService handler)
-
getObject
<T> T getObject(String key, TypeDescriptor type)
Read the value of config by type
- Parameters:
key- keytype- type descriptor- Returns:
value
-
setObject
void setObject(String key, Object value)
set value of config
- Parameters:
key- keyvalue- config
-
newObject
boolean newObject(String key, Object value, String comment, String handler)
create new config
- Parameters:
key- config keyvalue- config valuecomment- config commenthandler- 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 keyvalue- config valuecomment- config comment
-
getObjectCache
@Cacheable() <T> T getObjectCache(String key, TypeDescriptor type)
-
evictAllConfCache
@EventListener()@CacheEvict(allEntries = true, condition = "#result") boolean evictAllConfCache(TableChangeEvent event)
-
setWinConfRuntimeDao
@Autowired() void setWinConfRuntimeDao(WinConfRuntimeDao winConfRuntimeDao)
-
setWingsTableCudHandler
@Autowired() void setWingsTableCudHandler(WingsTableCudHandler wingsTableCudHandler)
-
-
-
-