本文整理了Java中redis.clients.jedis.JedisCommands.zrem()
方法的一些代码示例,展示了JedisCommands.zrem()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JedisCommands.zrem()
方法的具体详情如下:
包路径:redis.clients.jedis.JedisCommands
类名称:JedisCommands
方法名:zrem
暂无
代码示例来源:origin: Netflix/conductor
public Long zrem(String key, String member) {
return dynoClient.zrem(key, member);
}
代码示例来源:origin: brianfrankcooper/YCSB
@Override
public Status delete(String table, String key) {
return jedis.del(key) == 0 && jedis.zrem(INDEX_KEY, key) == 0 ? Status.ERROR
: Status.OK;
}
代码示例来源:origin: mpusher/mpush
public void zRem(String key, String value) {
call(jedis -> jedis.zrem(key, value));
}
代码示例来源:origin: com.netflix.conductor/conductor-redis-persistence
public Long zrem(String key, String member) {
return dynoClient.zrem(key, member);
}
代码示例来源:origin: com.github.mpusher/mpush-cache
public void zRem(String key, String value) {
call(jedis -> jedis.zrem(key, value));
}
代码示例来源:origin: vakinge/jeesuite-libs
/**
* 删除有序集合中的一个成员
* @param member
* @return
*/
public boolean remove(String mem){
try {
return getJedisCommands(groupName).zrem(key,mem) >= 1;
} finally{
getJedisProvider(groupName).release();
}
}
/**
代码示例来源:origin: Netflix/dyno-queues
long removed = quorumConn.zrem(myQueueShard, msgId);
if (removed == 0) {
if (logger.isDebugEnabled()) {
代码示例来源:origin: vakinge/jeesuite-libs
@Override
public void removeFromGroup(String cacheGroupKey, String key) {
JedisCommands commands = JedisProviderFactory.getJedisCommands(null);
try {
commands.zrem(cacheGroupKey, key);
//
commands.del(key);
} finally{
JedisProviderFactory.getJedisProvider(null).release();
}
}
代码示例来源:origin: com.netflix.spinnaker.orca/orca-redis
redisClientDelegate.withCommandsClient(c -> {
if (c.type(lookupKey).equals("zset")) {
c.zrem(lookupKey, executionId);
} else {
c.srem(lookupKey, executionId);
代码示例来源:origin: Netflix/dyno-queues
@Override
public boolean remove(String messageId) {
Stopwatch sw = monitor.remove.start();
try {
return execute("remove", "(a shard in) " + queueName, () -> {
for (String shard : allShards) {
String unackShardKey = getUnackKey(queueName, shard);
quorumConn.zrem(unackShardKey, messageId);
String queueShardKey = getQueueShardKey(queueName, shard);
Long removed = quorumConn.zrem(queueShardKey, messageId);
Long msgRemoved = quorumConn.hdel(messageStoreKey, messageId);
if (removed > 0 && msgRemoved > 0) {
return true;
}
}
return false;
});
} finally {
sw.stop();
}
}
代码示例来源:origin: Netflix/dyno-queues
@Override
public boolean ack(String messageId) {
Stopwatch sw = monitor.ack.start();
try {
return execute("ack", "(a shard in) " + queueName, () -> {
for (String shard : allShards) {
String unackShardKey = getUnackKey(queueName, shard);
Long removed = quorumConn.zrem(unackShardKey, messageId);
if (removed > 0) {
quorumConn.hdel(messageStoreKey, messageId);
return true;
}
}
return false;
});
} finally {
sw.stop();
}
}
代码示例来源:origin: com.netflix.spinnaker.orca/orca-redis
private void deleteInternal(RedisClientDelegate delegate, ExecutionType type, String id) {
delegate.withCommandsClient(c -> {
String key = executionKey(type, id);
try {
String application = c.hget(key, "application");
String appKey = appKey(type, application);
c.srem(appKey, id);
c.srem(allBufferedExecutionsKey(type), id);
if (type == PIPELINE) {
String pipelineConfigId = c.hget(key, "pipelineConfigId");
c.zrem(executionsByPipelineKey(pipelineConfigId), id);
}
} catch (ExecutionNotFoundException ignored) {
// do nothing
} finally {
c.del(key);
c.srem(alljobsKey(type), id);
}
});
}
内容来源于网络,如有侵权,请联系作者删除!