Tsz-wo Sze created HDDS-14846:
---------------------------------
Summary: Implement ScmCodecFactory without reflection.
Key: HDDS-14846
URL: https://issues.apache.org/jira/browse/HDDS-14846
Project: Apache Ozone
Issue Type: Sub-task
Components: SCM HA
Reporter: Tsz-wo Sze
Assignee: Chen-Jheng Sing
- The getCodec(Class) method in ScmCodecFactory uses reflection to get all
super classes/interfaces.
- It also forces the callers to use reflection in order get the class.
We should change the method to take a String and then use the
ClassResolver to resolve the Class.
BTW, we should also change ScmCodecFactory to singleton, i.e. change
the codecs map to non-static and add a static field (similar to Java
[Runtime|https://github.com/openjdk/jdk8u/blob/cb212803aa1132023e18935cbebec818fecb607f/jdk/src/share/classes/java/lang/Runtime.java#L47]).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]