[Enhancement] Admin, RocketMQAdmin, StandaloneAdmin and AbstractRmqAdmin can be more clearer. #3897
Closed
2 tasks done
Labels
enhancement
New feature or request
Milestone
Search before asking
Enhancement Request
org.apache.eventmesh.api.admin.Admin
org.apache.eventmesh.storage.rocketmq.admin.RocketMQAdmin, AbstractRmqAdmin
org.apache.eventmesh.storage.standalone.admin.StandaloneAdmin
AbstractRmqAdmin
's fieldadminExt
, is instantiated in the beginning, set to null at the end in every methods. So it loses the meaning as member field.Every calls of
getAdminExt()
will set member fieldnameServerAddr
,clusterName
to same value and execute some logic repetitively.AbstractRmqAdmin
's code can be write in its only subclassRocketMQAdmin
, then we can get more simple code structure.There are same field and methods in
RocketMQAdmin
andStandaloneAdmin
as subclass ofAdmin
.Describe the solution you'd like
adminExt
be local variable. Make the creation logic ofadminExt
isolate.AbstractRmqAdmin
's code intoRocketMQAdmin
.RocketMQAdmin
andStandaloneAdmin
.Are you willing to submit PR?
The text was updated successfully, but these errors were encountered: