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/org/apache/dubbo/registry/support/AbstractRegistryFactoryTest.java
test_class.identifier: AbstractRegistryFactoryTest
test_case.body: @Test
      public void testRegistryFactoryCache() throws Exception {
          URL url = URL.valueOf("dubbo://" + NetUtils.getLocalAddress().getHostAddress() + ":2233");
          Registry registry1 = registryFactory.getRegistry(url);
          Registry registry2 = registryFactory.getRegistry(url);
          Assertions.assertEquals(registry1, registry2);
      }
test_case.class_method_signature: AbstractRegistryFactoryTest.testRegistryFactoryCache()
test_case.full_signature: @Test public void testRegistryFactoryCache()
test_case.identifier: testRegistryFactoryCache
test_case.invocations: valueOf getHostAddress getLocalAddress getRegistry getRegistry assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testRegistryFactoryCache()
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: protected static final
focal_class.original_string: protected static final ReentrantLock LOCK = new ReentrantLock();
focal_class.type: ReentrantLock
focal_class.var_name: LOCK
focal_class.declarator: REGISTRIES = new HashMap<>()
focal_class.modifier: protected static final
focal_class.original_string: protected static final Map<String, Registry> REGISTRIES = new HashMap<>();
focal_class.type: Map<String, Registry>
focal_class.var_name: REGISTRIES
focal_class.declarator: destroyed = new AtomicBoolean(false)
focal_class.modifier: private static final
focal_class.original_string: private static final AtomicBoolean destroyed = new AtomicBoolean(false);
focal_class.type: AtomicBoolean
focal_class.var_name: destroyed
focal_class.declarator: DEFAULT_NOP_REGISTRY = new Registry() {
          @Override
          public URL getUrl() {
              return null;
          }
  
          @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;
          }
      }
focal_class.modifier: private static
focal_class.original_string: private static Registry DEFAULT_NOP_REGISTRY = new Registry() {
          @Override
          public URL getUrl() {
              return null;
          }
  
          @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;
          }
      };
focal_class.type: Registry
focal_class.var_name: DEFAULT_NOP_REGISTRY
focal_class.file: dubbo-registry/dubbo-registry-api/src/main/java/org/apache/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.getRegistry(String key)
focal_class.full_signature: public static Registry getRegistry(String key)
focal_class.identifier: getRegistry
focal_class.modifiers: public static
focal_class.parameters: (String key)
focal_class.return: Registry
focal_class.signature: Registry getRegistry(String key)
focal_class.class_method_signature: AbstractRegistryFactory.getServiceDiscoveries()
focal_class.full_signature: public static List<ServiceDiscovery> getServiceDiscoveries()
focal_class.identifier: getServiceDiscoveries
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: List<ServiceDiscovery>
focal_class.signature: List<ServiceDiscovery> getServiceDiscoveries()
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.createRegistryCacheKey(URL url)
focal_class.full_signature: protected String createRegistryCacheKey(URL url)
focal_class.identifier: createRegistryCacheKey
focal_class.modifiers: protected
focal_class.parameters: (URL url)
focal_class.return: String
focal_class.signature: String createRegistryCacheKey(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_class.class_method_signature: AbstractRegistryFactory.removeDestroyedRegistry(Registry toRm)
focal_class.full_signature: public static void removeDestroyedRegistry(Registry toRm)
focal_class.identifier: removeDestroyedRegistry
focal_class.modifiers: public static
focal_class.parameters: (Registry toRm)
focal_class.return: void
focal_class.signature: void removeDestroyedRegistry(Registry toRm)
focal_class.class_method_signature: AbstractRegistryFactory.clearRegistryNotDestroy()
focal_class.full_signature: public static void clearRegistryNotDestroy()
focal_class.identifier: clearRegistryNotDestroy
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void clearRegistryNotDestroy()
focal_method.body: public static Registry getRegistry(String key) {
          return REGISTRIES.get(key);
      }
focal_method.class_method_signature: AbstractRegistryFactory.getRegistry(String key)
focal_method.full_signature: public static Registry getRegistry(String key)
focal_method.identifier: getRegistry
focal_method.invocations: get
focal_method.modifiers: public static
focal_method.parameters: (String key)
focal_method.return: Registry
focal_method.signature: Registry getRegistry(String key)