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 field adminExt, 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 field nameServerAddr, clusterName to same value and execute some logic repetitively.
-
AbstractRmqAdmin's code can be write in its only subclass RocketMQAdmin, then we can get more simple code structure.
-
There are same field and methods in RocketMQAdmin and StandaloneAdmin as subclass of Admin.
Describe the solution you'd like
- Make
adminExt be local variable. Make the creation logic of adminExt isolate.
- Merge
AbstractRmqAdmin's code into RocketMQAdmin.
- Extract the shared field and method of
RocketMQAdmin and StandaloneAdmin.
Are you willing to submit PR?
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,clusterNameto 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
RocketMQAdminandStandaloneAdminas subclass ofAdmin.Describe the solution you'd like
adminExtbe local variable. Make the creation logic ofadminExtisolate.AbstractRmqAdmin's code intoRocketMQAdmin.RocketMQAdminandStandaloneAdmin.Are you willing to submit PR?