test_class.declarator: sc
test_class.modifier: private
test_class.original_string: private SessionConfiguration sc;
test_class.type: SessionConfiguration
test_class.var_name: sc
test_class.file: session-replacement/src/test/java/com/amadeus/session/repository/redis/TestRedisConfiguration.java
test_class.identifier: TestRedisConfiguration
test_case.body: @Test
    public void testExtractHostsAndPorts() {
      RedisConfiguration configuration = new RedisConfiguration(sc);
      List<HostAndPort> hostsAndPorts = configuration.hostsAndPorts();
      assertEquals(1, hostsAndPorts.size());
      assertEquals("127.0.0.1", hostsAndPorts.iterator().next().host);
    }
test_case.class_method_signature: TestRedisConfiguration.testExtractHostsAndPorts()
test_case.full_signature: @Test public void testExtractHostsAndPorts()
test_case.identifier: testExtractHostsAndPorts
test_case.invocations: hostsAndPorts assertEquals size assertEquals next iterator
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testExtractHostsAndPorts()
focal_class.declarator: METRIC_PREFIX = "com.amadeus.session"
focal_class.modifier: public static final
focal_class.original_string: public static final String METRIC_PREFIX = "com.amadeus.session";
focal_class.type: String
focal_class.var_name: METRIC_PREFIX
focal_class.declarator: REDIS_USE_IPV4 = "com.amadeus.session.redis.ipv4"
focal_class.modifier: public static final
focal_class.original_string: public static final String REDIS_USE_IPV4 = "com.amadeus.session.redis.ipv4";
focal_class.type: String
focal_class.var_name: REDIS_USE_IPV4
focal_class.declarator: REDIS_USE_IPV6 = "com.amadeus.session.redis.ipv6"
focal_class.modifier: public static final
focal_class.original_string: public static final String REDIS_USE_IPV6 = "com.amadeus.session.redis.ipv6";
focal_class.type: String
focal_class.var_name: REDIS_USE_IPV6
focal_class.declarator: REDIS_EXPIRATION_STRATEGY = "com.amadeus.session.redis.expiration"
focal_class.modifier: public static final
focal_class.original_string: public static final String REDIS_EXPIRATION_STRATEGY = "com.amadeus.session.redis.expiration";
focal_class.type: String
focal_class.var_name: REDIS_EXPIRATION_STRATEGY
focal_class.declarator: REDIS_TIMEOUT = "com.amadeus.session.redis.timeout"
focal_class.modifier: public static final
focal_class.original_string: public static final String REDIS_TIMEOUT = "com.amadeus.session.redis.timeout";
focal_class.type: String
focal_class.var_name: REDIS_TIMEOUT
focal_class.declarator: DEFAULT_REDIS_TIMEOUT = "2000"
focal_class.modifier: public static final
focal_class.original_string: public static final String DEFAULT_REDIS_TIMEOUT = "2000";
focal_class.type: String
focal_class.var_name: DEFAULT_REDIS_TIMEOUT
focal_class.declarator: REDIS_PORT = "com.amadeus.session.redis.port"
focal_class.modifier: public static final
focal_class.original_string: public static final String REDIS_PORT = "com.amadeus.session.redis.port";
focal_class.type: String
focal_class.var_name: REDIS_PORT
focal_class.declarator: REDIS_HOST = "com.amadeus.session.redis.host"
focal_class.modifier: public static final
focal_class.original_string: public static final String REDIS_HOST = "com.amadeus.session.redis.host";
focal_class.type: String
focal_class.var_name: REDIS_HOST
focal_class.declarator: REDIS_PASSWORD = "com.amadeus.session.redis.password"
focal_class.modifier: public static final
focal_class.original_string: public static final String REDIS_PASSWORD = "com.amadeus.session.redis.password";
focal_class.type: String
focal_class.var_name: REDIS_PASSWORD
focal_class.declarator: REDIS_SSL = "com.amadeus.session.redis.ssl"
focal_class.modifier: public static final
focal_class.original_string: public static final String REDIS_SSL = "com.amadeus.session.redis.ssl";
focal_class.type: String
focal_class.var_name: REDIS_SSL
focal_class.declarator: REDIS_TLS = "com.amadeus.session.redis.tls"
focal_class.modifier: public static final
focal_class.original_string: public static final String REDIS_TLS = "com.amadeus.session.redis.tls";
focal_class.type: String
focal_class.var_name: REDIS_TLS
focal_class.declarator: REDIS_POOL_SIZE = "com.amadeus.session.redis.pool"
focal_class.modifier: public static final
focal_class.original_string: public static final String REDIS_POOL_SIZE = "com.amadeus.session.redis.pool";
focal_class.type: String
focal_class.var_name: REDIS_POOL_SIZE
focal_class.declarator: DEFAULT_REDIS_POOL_SIZE = "100"
focal_class.modifier: public static final
focal_class.original_string: public static final String DEFAULT_REDIS_POOL_SIZE = "100";
focal_class.type: String
focal_class.var_name: DEFAULT_REDIS_POOL_SIZE
focal_class.declarator: REDIS_CLUSTER_MODE = "com.amadeus.session.redis.mode"
focal_class.modifier: public static final
focal_class.original_string: public static final String REDIS_CLUSTER_MODE = "com.amadeus.session.redis.mode";
focal_class.type: String
focal_class.var_name: REDIS_CLUSTER_MODE
focal_class.declarator: REDIS_MASTER_NAME = "com.amadeus.session.redis.master"
focal_class.modifier: public static final
focal_class.original_string: public static final String REDIS_MASTER_NAME = "com.amadeus.session.redis.master";
focal_class.type: String
focal_class.var_name: REDIS_MASTER_NAME
focal_class.declarator: DEFAULT_REDIS_MASTER_NAME = "com.amadeus.session"
focal_class.modifier: public static final
focal_class.original_string: public static final String DEFAULT_REDIS_MASTER_NAME = "com.amadeus.session";
focal_class.type: String
focal_class.var_name: DEFAULT_REDIS_MASTER_NAME
focal_class.declarator: logger = LoggerFactory.getLogger(RedisConfiguration.class)
focal_class.modifier: static final
focal_class.original_string: static final Logger logger = LoggerFactory.getLogger(RedisConfiguration.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: POOL_SIZE_PROPERTY = "pool="
focal_class.modifier: static final
focal_class.original_string: static final String POOL_SIZE_PROPERTY = "pool=";
focal_class.type: String
focal_class.var_name: POOL_SIZE_PROPERTY
focal_class.declarator: CLUSTER_MODE_PROPERTY = "mode="
focal_class.modifier: static final
focal_class.original_string: static final String CLUSTER_MODE_PROPERTY = "mode=";
focal_class.type: String
focal_class.var_name: CLUSTER_MODE_PROPERTY
focal_class.declarator: MASTER_NAME_PROPERTY = "master="
focal_class.modifier: static final
focal_class.original_string: static final String MASTER_NAME_PROPERTY = "master=";
focal_class.type: String
focal_class.var_name: MASTER_NAME_PROPERTY
focal_class.declarator: HOST_PROPERTY = "host="
focal_class.modifier: static final
focal_class.original_string: static final String HOST_PROPERTY = "host=";
focal_class.type: String
focal_class.var_name: HOST_PROPERTY
focal_class.declarator: PASSWORD_PROPERTY = "password="
focal_class.modifier: static final
focal_class.original_string: static final String PASSWORD_PROPERTY = "password=";
focal_class.type: String
focal_class.var_name: PASSWORD_PROPERTY
focal_class.declarator: SSL_PROPERTY = "ssl="
focal_class.modifier: static final
focal_class.original_string: static final String SSL_PROPERTY = "ssl=";
focal_class.type: String
focal_class.var_name: SSL_PROPERTY
focal_class.declarator: TLS_PROPERTY = "tls="
focal_class.modifier: static final
focal_class.original_string: static final String TLS_PROPERTY = "tls=";
focal_class.type: String
focal_class.var_name: TLS_PROPERTY
focal_class.declarator: REDIS_PORT_PROPERTY = "port="
focal_class.modifier: static final
focal_class.original_string: static final String REDIS_PORT_PROPERTY = "port=";
focal_class.type: String
focal_class.var_name: REDIS_PORT_PROPERTY
focal_class.declarator: EXPIRATION_PROPERTY = "expiration="
focal_class.modifier: static final
focal_class.original_string: static final String EXPIRATION_PROPERTY = "expiration=";
focal_class.type: String
focal_class.var_name: EXPIRATION_PROPERTY
focal_class.declarator: TIMEOUT_PROPERTY = "timeout="
focal_class.modifier: static final
focal_class.original_string: static final String TIMEOUT_PROPERTY = "timeout=";
focal_class.type: String
focal_class.var_name: TIMEOUT_PROPERTY
focal_class.declarator: clusterMode
focal_class.original_string: String clusterMode;
focal_class.type: String
focal_class.var_name: clusterMode
focal_class.declarator: masterName
focal_class.original_string: String masterName;
focal_class.type: String
focal_class.var_name: masterName
focal_class.declarator: server
focal_class.original_string: String server;
focal_class.type: String
focal_class.var_name: server
focal_class.declarator: port
focal_class.original_string: String port;
focal_class.type: String
focal_class.var_name: port
focal_class.declarator: password
focal_class.original_string: String password;
focal_class.type: String
focal_class.var_name: password
focal_class.declarator: useSSL
focal_class.original_string: Boolean useSSL;
focal_class.type: Boolean
focal_class.var_name: useSSL
focal_class.declarator: tls[]
focal_class.original_string: String tls[];
focal_class.type: String
focal_class.var_name: tls
focal_class.declarator: poolSize
focal_class.original_string: String poolSize;
focal_class.type: String
focal_class.var_name: poolSize
focal_class.declarator: strategy
focal_class.original_string: ExpirationStrategy strategy;
focal_class.type: ExpirationStrategy
focal_class.var_name: strategy
focal_class.declarator: supportIpV6
focal_class.original_string: Boolean supportIpV6;
focal_class.type: Boolean
focal_class.var_name: supportIpV6
focal_class.declarator: supportIpV4
focal_class.original_string: Boolean supportIpV4;
focal_class.type: Boolean
focal_class.var_name: supportIpV4
focal_class.declarator: timeout = null
focal_class.original_string: Integer timeout = null;
focal_class.type: Integer
focal_class.var_name: timeout
focal_class.file: session-replacement/src/main/java/com/amadeus/session/repository/redis/RedisConfiguration.java
focal_class.identifier: RedisConfiguration
focal_class.class_method_signature: RedisConfiguration.getStrategy()
focal_class.full_signature: public ExpirationStrategy getStrategy()
focal_class.identifier: getStrategy
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: ExpirationStrategy
focal_class.signature: ExpirationStrategy getStrategy()
focal_class.class_method_signature: RedisConfiguration.getTimeout()
focal_class.full_signature: public Integer getTimeout()
focal_class.identifier: getTimeout
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Integer
focal_class.signature: Integer getTimeout()
focal_class.class_method_signature: RedisConfiguration.getPoolSize()
focal_class.full_signature: public String getPoolSize()
focal_class.identifier: getPoolSize
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getPoolSize()
focal_class.class_method_signature: RedisConfiguration.RedisConfiguration(SessionConfiguration conf)
focal_class.full_signature: public  RedisConfiguration(SessionConfiguration conf)
focal_class.identifier: RedisConfiguration
focal_class.modifiers: public
focal_class.parameters: (SessionConfiguration conf)
focal_class.signature:  RedisConfiguration(SessionConfiguration conf)
focal_class.class_method_signature: RedisConfiguration.serverAddress(SessionConfiguration conf)
focal_class.full_signature: private void serverAddress(SessionConfiguration conf)
focal_class.identifier: serverAddress
focal_class.modifiers: private
focal_class.parameters: (SessionConfiguration conf)
focal_class.return: void
focal_class.signature: void serverAddress(SessionConfiguration conf)
focal_class.class_method_signature: RedisConfiguration.ipSupport(SessionConfiguration conf)
focal_class.full_signature: private void ipSupport(SessionConfiguration conf)
focal_class.identifier: ipSupport
focal_class.modifiers: private
focal_class.parameters: (SessionConfiguration conf)
focal_class.return: void
focal_class.signature: void ipSupport(SessionConfiguration conf)
focal_class.class_method_signature: RedisConfiguration.readConfigurationString(String conf)
focal_class.full_signature: private void readConfigurationString(String conf)
focal_class.identifier: readConfigurationString
focal_class.modifiers: private
focal_class.parameters: (String conf)
focal_class.return: void
focal_class.signature: void readConfigurationString(String conf)
focal_class.class_method_signature: RedisConfiguration.parseArgFromConfiguration(String arg)
focal_class.full_signature: private void parseArgFromConfiguration(String arg)
focal_class.identifier: parseArgFromConfiguration
focal_class.modifiers: private
focal_class.parameters: (String arg)
focal_class.return: void
focal_class.signature: void parseArgFromConfiguration(String arg)
focal_class.class_method_signature: RedisConfiguration.hostsAndPorts()
focal_class.full_signature: public List<HostAndPort> hostsAndPorts()
focal_class.identifier: hostsAndPorts
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: List<HostAndPort>
focal_class.signature: List<HostAndPort> hostsAndPorts()
focal_class.class_method_signature: RedisConfiguration.collectHosts(List<HostAndPort> hostAndPort, String[] serverAndPort, int portToUse)
focal_class.full_signature: private void collectHosts(List<HostAndPort> hostAndPort, String[] serverAndPort, int portToUse)
focal_class.identifier: collectHosts
focal_class.modifiers: private
focal_class.parameters: (List<HostAndPort> hostAndPort, String[] serverAndPort, int portToUse)
focal_class.return: void
focal_class.signature: void collectHosts(List<HostAndPort> hostAndPort, String[] serverAndPort, int portToUse)
focal_class.class_method_signature: RedisConfiguration.tlsStringToArray(String tlsStr)
focal_class.full_signature: private String[] tlsStringToArray(String tlsStr)
focal_class.identifier: tlsStringToArray
focal_class.modifiers: private
focal_class.parameters: (String tlsStr)
focal_class.return: String[]
focal_class.signature: String[] tlsStringToArray(String tlsStr)
focal_class.class_method_signature: RedisConfiguration.portToUse(String[] serverAndPort, int defaultPort)
focal_class.full_signature: private int portToUse(String[] serverAndPort, int defaultPort)
focal_class.identifier: portToUse
focal_class.modifiers: private
focal_class.parameters: (String[] serverAndPort, int defaultPort)
focal_class.return: int
focal_class.signature: int portToUse(String[] serverAndPort, int defaultPort)
focal_class.class_method_signature: RedisConfiguration.resolveServers(String serverName)
focal_class.full_signature: private InetAddress[] resolveServers(String serverName)
focal_class.identifier: resolveServers
focal_class.modifiers: private
focal_class.parameters: (String serverName)
focal_class.return: InetAddress[]
focal_class.signature: InetAddress[] resolveServers(String serverName)
focal_class.class_method_signature: RedisConfiguration.isIpSupported(InetAddress host)
focal_class.full_signature: private boolean isIpSupported(InetAddress host)
focal_class.identifier: isIpSupported
focal_class.modifiers: private
focal_class.parameters: (InetAddress host)
focal_class.return: boolean
focal_class.signature: boolean isIpSupported(InetAddress host)
focal_class.class_method_signature: RedisConfiguration.sentinels()
focal_class.full_signature:  Set<String> sentinels()
focal_class.identifier: sentinels
focal_class.parameters: ()
focal_class.return: Set<String>
focal_class.signature: Set<String> sentinels()
focal_class.class_method_signature: RedisConfiguration.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_method.body: public List<HostAndPort> hostsAndPorts() {
      List<HostAndPort> hostAndPorts = new ArrayList<>();
      int defaultPort = Integer.parseInt(this.port);
      try {
        String[] servers = server.split("[/;]");
        for (String aServer : servers) {
          String[] serverAndPort = aServer.split(":");
          int portToUse = portToUse(serverAndPort, defaultPort);
          collectHosts(hostAndPorts, serverAndPort, portToUse);
        }
      } catch (UnknownHostException e) {
        throw new IllegalArgumentException("Unable to resolve cluster host for configuration " + this, e);
      } catch (NumberFormatException e) {
        throw new IllegalArgumentException(
            "Port paramter was in server configuration. Expecting numeric values, but it was not: " + this);
      }
  
      for (HostAndPort hostAndPort : hostAndPorts) {
        logger.info("hostAndPort Host:" + hostAndPort.getHost() + "hostAndPort Port:" + hostAndPort.getPort());
      }
  
      logger.debug("Resolved hosts from '{}':{} are {}", server, port, hostAndPorts);
      return hostAndPorts;
    }
focal_method.class_method_signature: RedisConfiguration.hostsAndPorts()
focal_method.full_signature: public List<HostAndPort> hostsAndPorts()
focal_method.identifier: hostsAndPorts
focal_method.invocations: parseInt split split portToUse collectHosts info getHost getPort debug
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: List<HostAndPort>
focal_method.signature: List<HostAndPort> hostsAndPorts()