本文整理了Java中redis.clients.jedis.JedisCluster.rpop()
方法的一些代码示例,展示了JedisCluster.rpop()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JedisCluster.rpop()
方法的具体详情如下:
包路径:redis.clients.jedis.JedisCluster
类名称:JedisCluster
方法名:rpop
暂无
代码示例来源:origin: spring-projects/spring-data-redis
@Override
public byte[] rPop(byte[] key) {
Assert.notNull(key, "Key must not be null!");
try {
return connection.getCluster().rpop(key);
} catch (Exception ex) {
throw convertJedisAccessException(ex);
}
}
代码示例来源:origin: org.nutz/nutz-integration-jedis
public String rpop(String key) {
return jedisCluster.rpop(key);
}
代码示例来源:origin: dufyun/learn-tech-collection
/**
* 移除并返回列表 key 的尾元素。
* @param key
* @return
*/
public String popFromList(String key) {
return jedisCluster.rpop(key);
}
代码示例来源:origin: hhfcyong/xxxx-dubbo
/**
* 移除并返回列表 key 的尾元素
* 当 key 不存在时,返回 nil
* @param key
* @return
*/
public String rpop(String key){
return jedisCluster.rpop(key);
}
/**
代码示例来源:origin: net.oschina.j2cache/j2cache-core
@Override
public byte[] rpop(byte[] bytes) {
return cluster.rpop(bytes);
}
代码示例来源:origin: org.nutz/nutz-integration-jedis
public byte[] rpop(byte[] key) {
return jedisCluster.rpop(key);
}
代码示例来源:origin: com.github.yamingd.argo/argo-redis
@Override
public List<String> rpop(String key, int limit) {
byte[] bk = SafeEncoder.encode(key);
List<String> resp = new ArrayList<String>();
for (int i = 0; i < limit; i++) {
byte[] bs = jedisCluster.rpop(bk);
if (bs != null){
resp.add(SafeEncoder.encode(bs));
}
}
return resp;
}
代码示例来源:origin: org.springframework.data/spring-data-redis
@Override
public byte[] rPop(byte[] key) {
Assert.notNull(key, "Key must not be null!");
try {
return connection.getCluster().rpop(key);
} catch (Exception ex) {
throw convertJedisAccessException(ex);
}
}
代码示例来源:origin: yangfuhai/jboot
/**
* 移除并返回列表 key 的尾元素。
*/
@SuppressWarnings("unchecked")
public <T> T rpop(Object key) {
return (T) valueFromBytes(jedisCluster.rpop(keyToBytes(key)));
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public byte[] rPop(byte[] key) {
Assert.notNull(key, "Key must not be null!");
try {
return connection.getCluster().rpop(key);
} catch (Exception ex) {
throw convertJedisAccessException(ex);
}
}
代码示例来源:origin: com.github.yamingd.argo/argo-redis
@Override
public String rpop(String key) {
byte[] bs = jedisCluster.rpop(SafeEncoder.encode(key));
if (bs == null){
return null;
}
return SafeEncoder.encode(bs);
}
代码示例来源:origin: com.github.yamingd.argo/argo-redis
@Override
public <T> T rpop(Class<T> clazz, String key) {
byte[] bs = jedisCluster.rpop(SafeEncoder.encode(key));
if (bs == null){
return null;
}
try {
return getRedisBuffer().read(bs, clazz);
} catch (IOException e) {
logger.error(e.getMessage(), e);
return null;
}
}
代码示例来源:origin: com.github.yamingd.argo/argo-redis
@Override
public <T> List<T> rpop(Class<T> clazz, String key, int limit) {
byte[] bk = SafeEncoder.encode(key);
List<T> resp = new ArrayList<T>();
for (int i = 0; i < limit; i++) {
byte[] bs = jedisCluster.rpop(bk);
if (bs != null){
try {
resp.add(getRedisBuffer().read(bs, clazz));
} catch (IOException e) {
resp.add(null);
}
}
}
return resp;
}
代码示例来源:origin: org.nanoframework/nano-orm-jedis
case RPOP:
for (int idx = 0; idx <= count; idx++) {
values.add(cluster.rpop(key));
代码示例来源:origin: org.nanoframework/nano-orm-jedis
@Override
public String pop(final String key, final Mark pop) {
Assert.hasText(key);
Assert.notNull(pop);
try {
switch (pop) {
case LPOP:
return cluster.lpop(key);
case RPOP:
return cluster.rpop(key);
default:
throw new RedisClientException("Unknown pop type");
}
} catch (final Throwable e) {
throw new RedisClientException(e.getMessage(), e);
}
}
代码示例来源:origin: yrain/smart-cache
/**
* 移除并返回列表 key 的尾元素。
*/
@SuppressWarnings("unchecked")
public <E> E rpop(Object key) {
if (null == key) {
return null;
}
if (cluster) {
return (E) deserializeVal(jedisCluster.rpop(serializeKey(key)));
} else {
return (E) deserializeVal(jedisOperator.rpop(serializeKey(key)));
}
}
内容来源于网络,如有侵权,请联系作者删除!