Remove ServiceInstrumentation mechanism for further collector agent design.
This commit is contained in:
parent
b1002a98e1
commit
9dbd4ef683
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue