redis.clients.jedis.JedisCluster.select()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(0.9k)|赞(0)|评价(0)|浏览(375)

本文整理了Java中redis.clients.jedis.JedisCluster.select()方法的一些代码示例,展示了JedisCluster.select()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JedisCluster.select()方法的具体详情如下:
包路径:redis.clients.jedis.JedisCluster
类名称:JedisCluster
方法名:select

JedisCluster.select介绍

暂无

代码示例

代码示例来源:origin: yangfuhai/jboot

/**
 * 切换到指定的数据库,数据库索引号 index 用数字值指定,以 0 作为起始索引值。
 * 默认使用 0 号数据库。
 * 注意:在 Jedis 对象被关闭时,数据库又会重新被设置为初始值,所以本方法 select(...)
 * 正常工作需要使用如下方式之一:
 * 1:使用 RedisInterceptor,在本线程内共享同一个 Jedis 对象
 * 2:使用 JbootRedis.call(ICallback) 进行操作
 * 3:自行获取 Jedis 对象进行操作
 */
public String select(int databaseIndex) {
  return jedisCluster.select(databaseIndex);
}

代码示例来源:origin: hhfcyong/xxxx-dubbo

/**
 * 切换到指定的数据库,数据库索引号 index 用数字值指定,以 0 作为起始索引值,默认使用 0 号数据库
 * @param index
 * @return ok
 */
public String select(int index){
  return jedisCluster.select(index);
}
//Server(服务器)

代码示例来源:origin: org.nutz/nutz-integration-jedis

@Deprecated @Override
  
  public String select(int index) {
    return jedisCluster.select(index);
  }

相关文章

微信公众号

最新文章

更多

JedisCluster类方法