本文整理了Java中redis.clients.jedis.Jedis.sentinelGetMasterAddrByName()
方法的一些代码示例,展示了Jedis.sentinelGetMasterAddrByName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Jedis.sentinelGetMasterAddrByName()
方法的具体详情如下:
包路径:redis.clients.jedis.Jedis
类名称:Jedis
方法名:sentinelGetMasterAddrByName
[英]```
redis 127.0.0.1:26381> sentinel get-master-addr-by-name mymaster
[中]```
redis 127.0.0.1:26381> sentinel get-master-addr-by-name mymaster
1) "127.0.0.1"
2) "6379"
代码示例来源:origin: sohutv/cachecloud
jedis = new Jedis(hap.getHost(), hap.getPort());
List<String> masterAddr = jedis.sentinelGetMasterAddrByName(masterName);
代码示例来源:origin: tangyanbo/springmore
@Override
public List<String> action(Jedis jedis) {
return jedis.sentinelGetMasterAddrByName(masterName);
}
});
代码示例来源:origin: io.leopard/leopard-redis
@Override
public List<String> sentinelGetMasterAddrByName(String masterName) {
return jedis.sentinelGetMasterAddrByName(masterName);
}
代码示例来源:origin: io.leopard/leopard-redis
@Override
public List<String> sentinelGetMasterAddrByName(String masterName) {
return jedis.sentinelGetMasterAddrByName(masterName);
}
代码示例来源:origin: com.netflix.spinnaker.kork/kork-jedis
@Override
public List<String> sentinelGetMasterAddrByName(String masterName) {
String command = "sentinelGetMasterAddrByName";
return instrumented(command, () -> delegated.sentinelGetMasterAddrByName(masterName));
}
代码示例来源:origin: org.nutz/nutz-integration-jedis
/**
* <pre>
* redis 127.0.0.1:26381> sentinel get-master-addr-by-name mymaster
* 1) "127.0.0.1"
* 2) "6379"
* </pre>
*
* @param masterName
* @return two elements list of strings : host and port.
*/
public List<String> sentinelGetMasterAddrByName(String masterName) {
Jedis jedis = getJedis();
try {
return jedis.sentinelGetMasterAddrByName(masterName);
} finally {Streams.safeClose(jedis);}
}
代码示例来源:origin: apache/servicemix-bundles
List<String> masterAddr = j.sentinelGetMasterAddrByName(masterName);
if (masterAddr == null || masterAddr.size() != 2) {
log.warn("Can not get master addr, master name: {}. Sentinel: {}:{}.",masterName,host,port);
代码示例来源:origin: penggle/jedis-ms-sentinel
jedis = new Jedis(hap.getHost(), hap.getPort());
List<String> masterAddr = jedis.sentinelGetMasterAddrByName(masterName);
List<Map<String,String>> slaveAddrs = jedis.sentinelSlaves(masterName);
代码示例来源:origin: penggle/jedis-ms-sentinel
jedis = new Jedis(hap.getHost(), hap.getPort());
for(String masterName : masterNames){
List<String> masterAddr = jedis.sentinelGetMasterAddrByName(masterName);
List<Map<String,String>> slaveAddrs = jedis.sentinelSlaves(masterName);
代码示例来源:origin: warmbreeze/sharded-jedis-sentinel-pool
master = masterMap.get(masterName);
if (master == null) {
List<String> hostAndPort = jedis.sentinelGetMasterAddrByName(masterName);
if (hostAndPort != null && hostAndPort.size() > 0) {
master = toHostAndPort(hostAndPort);
代码示例来源:origin: DarkPhoenixs/connection-pool-client
.sentinelGetMasterAddrByName(masterName);
代码示例来源:origin: apache/servicemix-bundles
jedis = new Jedis(hap);
List<String> masterAddr = jedis.sentinelGetMasterAddrByName(masterName);
代码示例来源:origin: org.tinygroup/org.tinygroup.jedis
if (master == null) {
List<String> hostAndPort = jedis
.sentinelGetMasterAddrByName(masterName);
if (hostAndPort != null && hostAndPort.size() > 0) {
master = toHostAndPort(hostAndPort);
内容来源于网络,如有侵权,请联系作者删除!