mxsm commented on code in PR #3117:
URL:
https://github.com/apache/incubator-eventmesh/pull/3117#discussion_r1103741117
##########
eventmesh-spi/src/main/java/org/apache/eventmesh/spi/loader/JarExtensionClassLoader.java:
##########
@@ -50,33 +50,34 @@ public class JarExtensionClassLoader implements
ExtensionClassLoader {
private static final String EVENT_MESH_PLUGIN_DIR = "eventMeshPluginDir";
- private static final ConcurrentHashMap<Class<?>, Map<String, Class<?>>>
EXTENSION_CLASS_CACHE =
- new ConcurrentHashMap<>(16);
+ private static final String EVENTMESH_EXTENSION_PLUGIN_DIR =
System.getProperty(EVENT_MESH_PLUGIN_DIR,
+ Joiner.on(File.separator).join(Lists.newArrayList(".", "plugin")));
- private static final String EVENTMESH_EXTENSION_PLUGIN_DIR =
- System.getProperty(EVENT_MESH_PLUGIN_DIR,
- Joiner.on(File.separator).join(Lists.newArrayList(".",
"plugin")));
+ private static final JarExtensionClassLoader INSTANCE = new
JarExtensionClassLoader();
+
+ private final ConcurrentHashMap<Class<?>, Map<String, Class<?>>>
extensionClassCache = new ConcurrentHashMap<>(16);
Review Comment:
@jonyangx JarExtensionClassLoader is a singleton mode, and
extensionClassCache is a property
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]