test_class.declarator: registryFactory = new AbstractRegistryFactory() {
  
          @Override
          protected Registry createRegistry(final URL url) {
              return new Registry() {
  
                  public URL getUrl() {
                      return url;
                  }
  
                  @Override
                  public boolean isAvailable() {
                      return false;
                  }
  
                  @Override
                  public void destroy() {
                  }
  
                  @Override
                  public void register(URL url) {
                  }
  
                  @Override
                  public void unregister(URL url) {
                  }
  
                  @Override
                  public void subscribe(URL url, NotifyListener listener) {
                  }
  
                  @Override
                  public void unsubscribe(URL url, NotifyListener listener) {
                  }
  
                  @Override
                  public List<URL> lookup(URL url) {
                      return null;
                  }
  
              };
          }
      }
test_class.modifier: private
test_class.original_string: private RegistryFactory registryFactory = new AbstractRegistryFactory() {
  
          @Override
          protected Registry createRegistry(final URL url) {
              return new Registry() {
  
                  public URL getUrl() {
                      return url;
                  }
  
                  @Override
                  public boolean isAvailable() {
                      return false;
                  }
  
                  @Override
                  public void destroy() {
                  }
  
                  @Override
                  public void register(URL url) {
                  }
  
                  @Override
                  public void unregister(URL url) {
                  }
  
                  @Override
                  public void subscribe(URL url, NotifyListener listener) {
                  }
  
                  @Override
                  public void unsubscribe(URL url, NotifyListener listener) {
                  }
  
                  @Override
                  public List<URL> lookup(URL url) {
                      return null;
                  }
  
              };
          }
      };
test_class.type: RegistryFactory
test_class.var_name: registryFactory
test_class.file: dubbo-registry/dubbo-registry-api/src/test/java/com/alibaba/dubbo/registry/support/AbstractRegistryFactoryTest.java
test_class.identifier: AbstractRegistryFactoryTest
test_case.body: @Test
      public void testRegistryFactoryGroupCache() throws Exception {
          Registry registry1 = registryFactory.getRegistry(URL.valueOf("dubbo://" + NetUtils.getLocalHost() + ":2233?group=aaa"));
          Registry registry2 = registryFactory.getRegistry(URL.valueOf("dubbo://" + NetUtils.getLocalHost() + ":2233?group=bbb"));
          Assert.assertNotSame(registry1, registry2);
      }
test_case.class_method_signature: AbstractRegistryFactoryTest.testRegistryFactoryGroupCache()
test_case.full_signature: @Test public void testRegistryFactoryGroupCache()
test_case.identifier: testRegistryFactoryGroupCache
test_case.invocations: getRegistry valueOf getLocalHost getRegistry valueOf getLocalHost assertNotSame
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testRegistryFactoryGroupCache()
focal_class.declarator: LOGGER = LoggerFactory.getLogger(AbstractRegistryFactory.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger LOGGER = LoggerFactory.getLogger(AbstractRegistryFactory.class);
focal_class.type: Logger
focal_class.var_name: LOGGER
focal_class.declarator: LOCK = new ReentrantLock()
focal_class.modifier: private static final
focal_class.original_string: private static final ReentrantLock LOCK = new ReentrantLock();
focal_class.type: ReentrantLock
focal_class.var_name: LOCK
focal_class.declarator: REGISTRIES = new ConcurrentHashMap<String, Registry>()
focal_class.modifier: private static final
focal_class.original_string: private static final Map<String, Registry> REGISTRIES = new ConcurrentHashMap<String, Registry>();
focal_class.type: Map<String, Registry>
focal_class.var_name: REGISTRIES
focal_class.file: dubbo-registry/dubbo-registry-api/src/main/java/com/alibaba/dubbo/registry/support/AbstractRegistryFactory.java
focal_class.identifier: AbstractRegistryFactory
focal_class.interfaces: implements RegistryFactory
focal_class.class_method_signature: AbstractRegistryFactory.getRegistries()
focal_class.full_signature: public static Collection<Registry> getRegistries()
focal_class.identifier: getRegistries
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: Collection<Registry>
focal_class.signature: Collection<Registry> getRegistries()
focal_class.class_method_signature: AbstractRegistryFactory.destroyAll()
focal_class.full_signature: public static void destroyAll()
focal_class.identifier: destroyAll
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void destroyAll()
focal_class.class_method_signature: AbstractRegistryFactory.getRegistry(URL url)
focal_class.full_signature: @Override public Registry getRegistry(URL url)
focal_class.identifier: getRegistry
focal_class.modifiers: @Override public
focal_class.parameters: (URL url)
focal_class.return: Registry
focal_class.signature: Registry getRegistry(URL url)
focal_class.class_method_signature: AbstractRegistryFactory.createRegistry(URL url)
focal_class.full_signature: protected abstract Registry createRegistry(URL url)
focal_class.identifier: createRegistry
focal_class.modifiers: protected abstract
focal_class.parameters: (URL url)
focal_class.return: Registry
focal_class.signature: Registry createRegistry(URL url)
focal_method.body: @Override
      public Registry getRegistry(URL url) {
          url = url.setPath(RegistryService.class.getName())
                  .addParameter(Constants.INTERFACE_KEY, RegistryService.class.getName())
                  .removeParameters(Constants.EXPORT_KEY, Constants.REFER_KEY);
          String key = url.toServiceString();
          // Lock the registry access process to ensure a single instance of the registry
          LOCK.lock();
          try {
              // 从 REGISTRIES 缓存获取Registry
              Registry registry = REGISTRIES.get(key);
              if (registry != null) {
                  return registry;
              }
              // 创建Registry
              registry = createRegistry(url);
              if (registry == null) {
                  throw new IllegalStateException("Can not create registry " + url);
              }
              REGISTRIES.put(key, registry);
              return registry;
          } finally {
              // Release the lock
              LOCK.unlock();
          }
      }
focal_method.class_method_signature: AbstractRegistryFactory.getRegistry(URL url)
focal_method.full_signature: @Override public Registry getRegistry(URL url)
focal_method.identifier: getRegistry
focal_method.invocations: removeParameters addParameter setPath getName getName toServiceString lock get createRegistry put unlock
focal_method.modifiers: @Override public
focal_method.parameters: (URL url)
focal_method.return: Registry
focal_method.signature: Registry getRegistry(URL url)