Replies: 2 comments 21 replies
-
I can get your idea. Basically, I think it should be good. But there are questions. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Yes , |
Beta Was this translation helpful? Give feedback.
21 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi , team
Currently , if we want to add a dynamic config for OAP , we need to create class which extends
ConfigChangeWatcher
, and add it to ModuleConfig as field , just like:And we have to set
cacheWriteLatencyThresholdsAndWatcher
on module prepare stage , register this watcher throughregisterConfigChangeWatcher
on module start stage .This is initial idea about simplifying watcher in module config .
Declare interface in
library-module
, this interface is responsible for transforming property value to an object :ModuleConfigurationProcessor
should be defined inModuleDefine
as field , and would be invoked in methodModuleDefine#copyProperties
Provide a annotation , such as
WatcherBinder
inconfiguration-api
module . The annotation could marked on field which type isConfigChangeWatcher
subclassProvide a implementation of
ModuleConfigurationProcessor
inconfiguration-api
module and set the processor to everyModuleDefine
when config module start ,In the end ,
ModuleConfigurationProcessor
could transform propertyValue to a Watcher object according annotationWatcherBinder
marked on the targetField , also collect these watchers for registeringBeta Was this translation helpful? Give feedback.
All reactions