提交 9dbd4ef6 编写于 作者: wu-sheng's avatar wu-sheng

Remove ServiceInstrumentation mechanism for further collector agent design.

上级 b1002a98
......@@ -31,7 +31,6 @@ import java.util.ServiceLoader;
*/
public class ModuleManager {
private Map<String, Module> loadedModules = new HashMap<>();
private boolean isServiceInstrument = true;
/**
* Init the given modules
......@@ -81,12 +80,4 @@ public class ModuleManager {
return module;
throw new ModuleNotFoundException(moduleName + " missing.");
}
public boolean isServiceInstrument() {
return isServiceInstrument;
}
public void setServiceInstrument(boolean serviceInstrument) {
isServiceInstrument = serviceInstrument;
}
}
......@@ -95,9 +95,6 @@ public abstract class ModuleProvider {
protected final void registerServiceImplementation(Class<? extends Service> serviceType,
Service service) throws ServiceNotProvidedException {
if (serviceType.isInstance(service)) {
if (manager.isServiceInstrument()) {
// service = ServiceInstrumentation.INSTANCE.buildServiceUnderMonitor(module.name(), name(), service);
}
this.services.put(serviceType, service);
} else {
throw new ServiceNotProvidedException(serviceType + " is not implemented by " + service);
......
......@@ -48,7 +48,6 @@ public class ModuleManagerTest {
configuration.addModule("BaseB").addProviderConfiguration("P-B", null);
ModuleManager manager = new ModuleManager();
manager.setServiceInstrument(true);
manager.init(configuration);
BaseModuleA.ServiceABusiness1 serviceABusiness1 = manager.find("BaseA").getService(BaseModuleA.ServiceABusiness1.class);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册