本文整理了Java中redis.clients.jedis.JedisCluster.lrem()
方法的一些代码示例,展示了JedisCluster.lrem()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JedisCluster.lrem()
方法的具体详情如下:
包路径:redis.clients.jedis.JedisCluster
类名称:JedisCluster
方法名:lrem
暂无
代码示例来源:origin: spring-projects/spring-data-redis
@Override
public Long lRem(byte[] key, long count, byte[] value) {
Assert.notNull(key, "Key must not be null!");
Assert.notNull(value, "Value must not be null!");
try {
return connection.getCluster().lrem(key, count, value);
} catch (Exception ex) {
throw convertJedisAccessException(ex);
}
}
代码示例来源:origin: dufyun/learn-tech-collection
/**
* 根据参数 count 的值,移除列表中与参数 value 相等的元素。
* 默认count = 1
* 从表头开始向表尾搜索,移除与 value 相等的元素,数量为 count 。
* @param key
* @param value
* @return
*/
public Long popValueFromList(String key, String value) {
return jedisCluster.lrem(key, 1, value);
}
代码示例来源:origin: hhfcyong/xxxx-dubbo
/**
* count > 0 : 从表头开始向表尾搜索,移除与 value 相等的元素,数量为 count
* count < 0 : 从表尾开始向表头搜索,移除与 value 相等的元素,数量为 count 的绝对值
* count = 0 : 移除表中所有与 value 相等的值
* @param key
* @param count
* @param value
* @return 被移除元素的数量
*/
public long lrem(String key,long count,String value){
return jedisCluster.lrem(key, count, value);
}
/**
代码示例来源:origin: net.oschina.j2cache/j2cache-core
@Override
public Long lrem(byte[] bytes, long l, byte[] bytes1) {
return cluster.lrem(bytes, l, bytes1);
}
代码示例来源:origin: org.nutz/nutz-integration-jedis
public Long lrem(String key, long count, String value) {
return jedisCluster.lrem(key, count, value);
}
代码示例来源:origin: org.nutz/nutz-integration-jedis
public Long lrem(byte[] key, long count, byte[] value) {
return jedisCluster.lrem(key, count, value);
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public Long lRem(byte[] key, long count, byte[] value) {
Assert.notNull(key, "Key must not be null!");
Assert.notNull(value, "Value must not be null!");
try {
return connection.getCluster().lrem(key, count, value);
} catch (Exception ex) {
throw convertJedisAccessException(ex);
}
}
代码示例来源:origin: org.springframework.data/spring-data-redis
@Override
public Long lRem(byte[] key, long count, byte[] value) {
Assert.notNull(key, "Key must not be null!");
Assert.notNull(value, "Value must not be null!");
try {
return connection.getCluster().lrem(key, count, value);
} catch (Exception ex) {
throw convertJedisAccessException(ex);
}
}
代码示例来源:origin: yangfuhai/jboot
/**
* 根据参数 count 的值,移除列表中与参数 value 相等的元素。
* count 的值可以是以下几种:
* count 大于 0 : 从表头开始向表尾搜索,移除与 value 相等的元素,数量为 count 。
* count 小于 0 : 从表尾开始向表头搜索,移除与 value 相等的元素,数量为 count 的绝对值。
* count 等于 0 : 移除表中所有与 value 相等的值。
*/
public Long lrem(Object key, long count, Object value) {
return jedisCluster.lrem(keyToBytes(key), count, valueToBytes(value));
}
代码示例来源:origin: com.github.yamingd.argo/argo-redis
@Override
public <T> Long lrem(Class<T> clazz, String key, T value) {
try {
byte[] bytes = getRedisBuffer().write(value);
return jedisCluster.lrem(SafeEncoder.encode(key), 0, bytes);
} catch (IOException e) {
logger.error(e.getMessage(), e);
return null;
}
}
代码示例来源:origin: com.github.yamingd.argo/argo-redis
@Override
public Long lrem(String key, String value) {
return jedisCluster.lrem(SafeEncoder.encode(key), 0, SafeEncoder.encode(value));
}
代码示例来源:origin: org.nanoframework/nano-orm-jedis
@Override
public long lrem(final String key, final int count, final String value) {
Assert.hasText(key);
Assert.hasText(value);
try {
return cluster.lrem(key, count, value);
} catch (final Throwable e) {
throw new RedisClientException(e.getMessage(), e);
}
}
代码示例来源:origin: yrain/smart-cache
public Long lrem(Object key, Object obj) {
if (null == key || null == obj) {
return null;
}
if (cluster) {
return jedisCluster.lrem(serializeKey(key), 0, serializeVal(obj));
} else {
return jedisOperator.lrem(serializeKey(key), 0, serializeVal(obj));
}
}
代码示例来源:origin: yrain/smart-cache
/**
* 根据参数 count 的值,移除列表中与参数 value 相等的元素。
* count 的值可以是以下几种:
* count > 0 : 从表头开始向表尾搜索,移除与 value 相等的元素,数量为 count 。
* count < 0 : 从表尾开始向表头搜索,移除与 value 相等的元素,数量为 count 的绝对值。
* count = 0 : 移除表中所有与 value 相等的值。
*/
public Long lrem(Object key, int count, Object obj) {
if (null == key || null == obj) {
return null;
}
if (cluster) {
return jedisCluster.lrem(serializeKey(key), count, serializeVal(obj));
} else {
return jedisOperator.lrem(serializeKey(key), count, serializeVal(obj));
}
}
内容来源于网络,如有侵权,请联系作者删除!