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(@NotNull() String type, @NotNull() ConversionService handler)<T> TgetObject(@NotNull() String key, @NotNull() TypeDescriptor type)Read the value of config by type booleansetObject(@NotNull() String key, @NotNull() Object value)set value of config, return false if not found booleannewObject(@NotNull() String key, @NotNull() Object value, String comment, String handler, ResolvableType structs)create new config, return true if handled booleanenable(@NotNull() String key, boolean enable)enable/disable the config, success or throw an error. <T> TgetObjectCache(@NotNull() String key, @NotNull() 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
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
-
-
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- keytype- type descriptor- Returns:
value
-
setObject
boolean setObject(@NotNull() String key, @NotNull() Object value)
set value of config, return false if not found
- Parameters:
key- keyvalue- 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 keyvalue- config valuecomment- config comment, empty if nullhandler- 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)
-
evictAllConfCache
@EventListener()@CacheEvict(allEntries = true, condition = "#result") boolean evictAllConfCache(TableChangeEvent event)
-
setWinConfRuntimeDao
@Autowired() void setWinConfRuntimeDao(WinConfRuntimeDao winConfRuntimeDao)
-
setWingsTableCudHandler
@Autowired() void setWingsTableCudHandler(WingsTableCudHandler wingsTableCudHandler)
-
-
-
-