Package redis.clients.jedis

Examples of redis.clients.jedis.HostAndPort


    String hostPortStr = directMasterName.substring(directMasterName.indexOf(":") + 1, directMasterName.length());
    String[] hostPort = hostPortStr.split(":");

    logger.info("Building JedisDirectPool, on redis server " + hostPort[0] + " ,sentinelPort is " + hostPort[1]);

    HostAndPort masterAddress = new HostAndPort(hostPort[0], Integer.parseInt(hostPort[1]));
    return new JedisDirectPool(masterAddress, config);
  }
View Full Code Here


    logger.info("Building JedisSentinelPool, on sentinel sentinelHosts:" + Arrays.toString(sentinelHosts)
        + " ,sentinelPort is " + sentinelPort + " ,masterName is " + sentinelMasterName);

    HostAndPort[] sentinelAddress = new HostAndPort[sentinelHosts.length];
    for (int i = 0; i < sentinelHosts.length; i++) {
      sentinelAddress[i] = new HostAndPort(sentinelHosts[i], sentinelPort);
    }

    return new JedisSentinelPool(sentinelAddress, sentinelMasterName, connectionInfo, config);
  }
View Full Code Here

TOP

Related Classes of redis.clients.jedis.HostAndPort

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.