use of com.alipay.sofa.runtime.model.ComponentType in project sofa-boot by alipay.
the class ComponentManagerImpl method _typeRegistry.
protected void _typeRegistry(ComponentInfo componentInfo) {
ComponentName name = componentInfo.getName();
if (name != null) {
ComponentType type = name.getType();
Map<ComponentName, ComponentInfo> typesRi = resolvedRegistry.get(type);
if (typesRi == null) {
resolvedRegistry.putIfAbsent(type, new HashMap<ComponentName, ComponentInfo>());
typesRi = resolvedRegistry.get(type);
}
typesRi.put(name, componentInfo);
}
}
use of com.alipay.sofa.runtime.model.ComponentType in project sofa-boot by alipay.
the class ComponentManagerImpl method unregister.
public void unregister(ComponentInfo componentInfo) throws ServiceRuntimeException {
ComponentName componentName = componentInfo.getName();
registry.remove(componentName);
if (componentName != null) {
ComponentType componentType = componentName.getType();
Map<ComponentName, ComponentInfo> typesRi = resolvedRegistry.get(componentType);
typesRi.remove(componentName);
}
componentInfo.unregister();
}
Aggregations