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