test_class.declarator: service = "com.alibaba.dubbo.test.injvmServie"
test_class.modifier: private
test_class.original_string: private String service = "com.alibaba.dubbo.test.injvmServie";
test_class.type: String
test_class.var_name: service
test_class.declarator: serviceUrl = URL.valueOf("redis://redis/" + service + "?notify=false&methods=test1,test2")
test_class.modifier: private
test_class.original_string: private URL serviceUrl = URL.valueOf("redis://redis/" + service + "?notify=false&methods=test1,test2");
test_class.type: URL
test_class.var_name: serviceUrl
test_class.declarator: redisServer
test_class.modifier: private
test_class.original_string: private RedisServer redisServer;
test_class.type: RedisServer
test_class.var_name: redisServer
test_class.declarator: redisRegistry
test_class.modifier: private
test_class.original_string: private RedisRegistry redisRegistry;
test_class.type: RedisRegistry
test_class.var_name: redisRegistry
test_class.declarator: registryUrl
test_class.modifier: private
test_class.original_string: private URL registryUrl;
test_class.type: URL
test_class.var_name: registryUrl
test_class.file: dubbo-registry/dubbo-registry-redis/src/test/java/com/alibaba/dubbo/registry/redis/RedisRegistryTest.java
test_class.identifier: RedisRegistryTest
test_case.body: @Test
      public void testAvailableWithBackup() {
          URL url = URL.valueOf("redis://redisOne:8880").addParameter(BACKUP_KEY, "redisTwo:8881");
          Registry registry = new RedisRegistryFactory().createRegistry(url);
  
          assertThat(registry.isAvailable(), is(false));
  
          url = URL.valueOf(this.registryUrl.toFullString()).addParameter(BACKUP_KEY, "redisTwo:8881");
          registry = new RedisRegistryFactory().createRegistry(url);
  
          assertThat(registry.isAvailable(), is(true));
      }
test_case.class_method_signature: RedisRegistryTest.testAvailableWithBackup()
test_case.full_signature: @Test public void testAvailableWithBackup()
test_case.identifier: testAvailableWithBackup
test_case.invocations: addParameter valueOf createRegistry assertThat isAvailable is addParameter valueOf toFullString createRegistry assertThat isAvailable is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testAvailableWithBackup()
focal_class.declarator: logger = LoggerFactory.getLogger(RedisRegistry.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(RedisRegistry.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: DEFAULT_REDIS_PORT = 6379
focal_class.modifier: private static final
focal_class.original_string: private static final int DEFAULT_REDIS_PORT = 6379;
focal_class.type: int
focal_class.var_name: DEFAULT_REDIS_PORT
focal_class.declarator: DEFAULT_ROOT = "dubbo"
focal_class.modifier: private final static
focal_class.original_string: private final static String DEFAULT_ROOT = "dubbo";
focal_class.type: String
focal_class.var_name: DEFAULT_ROOT
focal_class.declarator: expireExecutor = Executors.newScheduledThreadPool(1, new NamedThreadFactory("DubboRegistryExpireTimer", true))
focal_class.modifier: private final
focal_class.original_string: private final ScheduledExecutorService expireExecutor = Executors.newScheduledThreadPool(1, new NamedThreadFactory("DubboRegistryExpireTimer", true));
focal_class.type: ScheduledExecutorService
focal_class.var_name: expireExecutor
focal_class.declarator: expireFuture
focal_class.modifier: private final
focal_class.original_string: private final ScheduledFuture<?> expireFuture;
focal_class.type: ScheduledFuture<?>
focal_class.var_name: expireFuture
focal_class.declarator: root
focal_class.modifier: private final
focal_class.original_string: private final String root;
focal_class.type: String
focal_class.var_name: root
focal_class.declarator: jedisPools = new ConcurrentHashMap<String, JedisPool>()
focal_class.modifier: private final
focal_class.original_string: private final Map<String, JedisPool> jedisPools = new ConcurrentHashMap<String, JedisPool>();
focal_class.type: Map<String, JedisPool>
focal_class.var_name: jedisPools
focal_class.declarator: notifiers = new ConcurrentHashMap<String, Notifier>()
focal_class.modifier: private final
focal_class.original_string: private final ConcurrentMap<String, Notifier> notifiers = new ConcurrentHashMap<String, Notifier>();
focal_class.type: ConcurrentMap<String, Notifier>
focal_class.var_name: notifiers
focal_class.declarator: reconnectPeriod
focal_class.modifier: private final
focal_class.original_string: private final int reconnectPeriod;
focal_class.type: int
focal_class.var_name: reconnectPeriod
focal_class.declarator: expirePeriod
focal_class.modifier: private final
focal_class.original_string: private final int expirePeriod;
focal_class.type: int
focal_class.var_name: expirePeriod
focal_class.declarator: admin = false
focal_class.modifier: private volatile
focal_class.original_string: private volatile boolean admin = false;
focal_class.type: boolean
focal_class.var_name: admin
focal_class.declarator: replicate
focal_class.modifier: private
focal_class.original_string: private boolean replicate;
focal_class.type: boolean
focal_class.var_name: replicate
focal_class.file: dubbo-registry/dubbo-registry-redis/src/main/java/com/alibaba/dubbo/registry/redis/RedisRegistry.java
focal_class.identifier: RedisRegistry
focal_class.class_method_signature: RedisRegistry.RedisRegistry(URL url)
focal_class.full_signature: public  RedisRegistry(URL url)
focal_class.identifier: RedisRegistry
focal_class.modifiers: public
focal_class.parameters: (URL url)
focal_class.signature:  RedisRegistry(URL url)
focal_class.class_method_signature: RedisRegistry.deferExpired()
focal_class.full_signature: private void deferExpired()
focal_class.identifier: deferExpired
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void deferExpired()
focal_class.class_method_signature: RedisRegistry.clean(Jedis jedis)
focal_class.full_signature: private void clean(Jedis jedis)
focal_class.identifier: clean
focal_class.modifiers: private
focal_class.parameters: (Jedis jedis)
focal_class.return: void
focal_class.signature: void clean(Jedis jedis)
focal_class.class_method_signature: RedisRegistry.isAvailable()
focal_class.full_signature: @Override public boolean isAvailable()
focal_class.identifier: isAvailable
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isAvailable()
focal_class.class_method_signature: RedisRegistry.destroy()
focal_class.full_signature: @Override public void destroy()
focal_class.identifier: destroy
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void destroy()
focal_class.class_method_signature: RedisRegistry.doRegister(URL url)
focal_class.full_signature: @Override public void doRegister(URL url)
focal_class.identifier: doRegister
focal_class.modifiers: @Override public
focal_class.parameters: (URL url)
focal_class.return: void
focal_class.signature: void doRegister(URL url)
focal_class.class_method_signature: RedisRegistry.doUnregister(URL url)
focal_class.full_signature: @Override public void doUnregister(URL url)
focal_class.identifier: doUnregister
focal_class.modifiers: @Override public
focal_class.parameters: (URL url)
focal_class.return: void
focal_class.signature: void doUnregister(URL url)
focal_class.class_method_signature: RedisRegistry.doSubscribe(final URL url, final NotifyListener listener)
focal_class.full_signature: @Override public void doSubscribe(final URL url, final NotifyListener listener)
focal_class.identifier: doSubscribe
focal_class.modifiers: @Override public
focal_class.parameters: (final URL url, final NotifyListener listener)
focal_class.return: void
focal_class.signature: void doSubscribe(final URL url, final NotifyListener listener)
focal_class.class_method_signature: RedisRegistry.doUnsubscribe(URL url, NotifyListener listener)
focal_class.full_signature: @Override public void doUnsubscribe(URL url, NotifyListener listener)
focal_class.identifier: doUnsubscribe
focal_class.modifiers: @Override public
focal_class.parameters: (URL url, NotifyListener listener)
focal_class.return: void
focal_class.signature: void doUnsubscribe(URL url, NotifyListener listener)
focal_class.class_method_signature: RedisRegistry.doNotify(Jedis jedis, String key)
focal_class.full_signature: private void doNotify(Jedis jedis, String key)
focal_class.identifier: doNotify
focal_class.modifiers: private
focal_class.parameters: (Jedis jedis, String key)
focal_class.return: void
focal_class.signature: void doNotify(Jedis jedis, String key)
focal_class.class_method_signature: RedisRegistry.doNotify(Jedis jedis, Collection<String> keys, URL url, Collection<NotifyListener> listeners)
focal_class.full_signature: private void doNotify(Jedis jedis, Collection<String> keys, URL url, Collection<NotifyListener> listeners)
focal_class.identifier: doNotify
focal_class.modifiers: private
focal_class.parameters: (Jedis jedis, Collection<String> keys, URL url, Collection<NotifyListener> listeners)
focal_class.return: void
focal_class.signature: void doNotify(Jedis jedis, Collection<String> keys, URL url, Collection<NotifyListener> listeners)
focal_class.class_method_signature: RedisRegistry.toServiceName(String categoryPath)
focal_class.full_signature: private String toServiceName(String categoryPath)
focal_class.identifier: toServiceName
focal_class.modifiers: private
focal_class.parameters: (String categoryPath)
focal_class.return: String
focal_class.signature: String toServiceName(String categoryPath)
focal_class.class_method_signature: RedisRegistry.toCategoryName(String categoryPath)
focal_class.full_signature: private String toCategoryName(String categoryPath)
focal_class.identifier: toCategoryName
focal_class.modifiers: private
focal_class.parameters: (String categoryPath)
focal_class.return: String
focal_class.signature: String toCategoryName(String categoryPath)
focal_class.class_method_signature: RedisRegistry.toServicePath(String categoryPath)
focal_class.full_signature: private String toServicePath(String categoryPath)
focal_class.identifier: toServicePath
focal_class.modifiers: private
focal_class.parameters: (String categoryPath)
focal_class.return: String
focal_class.signature: String toServicePath(String categoryPath)
focal_class.class_method_signature: RedisRegistry.toServicePath(URL url)
focal_class.full_signature: private String toServicePath(URL url)
focal_class.identifier: toServicePath
focal_class.modifiers: private
focal_class.parameters: (URL url)
focal_class.return: String
focal_class.signature: String toServicePath(URL url)
focal_class.class_method_signature: RedisRegistry.toCategoryPath(URL url)
focal_class.full_signature: private String toCategoryPath(URL url)
focal_class.identifier: toCategoryPath
focal_class.modifiers: private
focal_class.parameters: (URL url)
focal_class.return: String
focal_class.signature: String toCategoryPath(URL url)
focal_class.superclass: extends FailbackRegistry
focal_method.body: @Override
      public boolean isAvailable() {
          for (JedisPool jedisPool : jedisPools.values()) {
              try {
                  Jedis jedis = jedisPool.getResource();
                  try {
                      if (jedis.isConnected()) {
                          return true; // At least one single machine is available.
                      }
                  } finally {
                      jedis.close();
                  }
              } catch (Throwable t) {
              }
          }
          return false;
      }
focal_method.class_method_signature: RedisRegistry.isAvailable()
focal_method.full_signature: @Override public boolean isAvailable()
focal_method.identifier: isAvailable
focal_method.invocations: values getResource isConnected close
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: boolean
focal_method.signature: boolean isAvailable()