本文整理了Java中redis.clients.jedis.JedisCommands.hdel()
方法的一些代码示例,展示了JedisCommands.hdel()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JedisCommands.hdel()
方法的具体详情如下:
包路径:redis.clients.jedis.JedisCommands
类名称:JedisCommands
方法名:hdel
暂无
代码示例来源:origin: Netflix/conductor
public Long hdel(String key, String... fields) {
logger.trace("hdel {} {}", key, fields[0]);
return dynoClient.hdel(key, fields);
}
代码示例来源:origin: mpusher/mpush
public void hdel(String key, String field) {
call(jedis -> jedis.hdel(key, field));
}
代码示例来源:origin: com.netflix.conductor/conductor-redis-persistence
public Long hdel(String key, String... fields) {
logger.trace("hdel {} {}", key, fields[0]);
return dynoClient.hdel(key, fields);
}
代码示例来源:origin: com.github.mpusher/mpush-cache
public void hdel(String key, String field) {
call(jedis -> jedis.hdel(key, field));
}
代码示例来源:origin: com.gitee.qdbp/qdbp-general-biz
/** {@inheritDoc} **/
@Override
public void hdel(String key, String subkey, String field) {
JedisCommands jedis = this.getInstanceByKey(key);
jedis.hdel(concat(key, subkey), field);
}
代码示例来源:origin: com.gitee.zhaohuihua/bdp-general-svc
/** {@inheritDoc} **/
@Override
public void hdel(String key, String subkey, String field) {
JedisCommands jedis = this.getInstanceByKey(key);
jedis.hdel(concat(key, subkey), field);
}
代码示例来源:origin: vakinge/jeesuite-libs
/**
* 移除hash缓存中的指定值
*
* @param field
* @return
*/
public boolean remove(String field) {
try {
return getJedisCommands(groupName).hdel(key, field).equals(RESP_OK);
} finally {
getJedisProvider(groupName).release();
}
}
代码示例来源:origin: com.gitee.qdbp/qdbp-general-biz
/** {@inheritDoc} **/
@Override
public long hmdel(String key, String subkey, List<String> fields) {
if (fields == null || fields.size() == 0) {
return 0;
} else {
JedisCommands jedis = this.getInstanceByKey(key);
return jedis.hdel(concat(key, subkey), toArray(fields));
}
}
代码示例来源:origin: com.gitee.zhaohuihua/bdp-general-svc
/** {@inheritDoc} **/
@Override
public long hmdel(String key, String subkey, List<String> fields) {
if (fields == null || fields.size() == 0) {
return 0;
} else {
JedisCommands jedis = this.getInstanceByKey(key);
return jedis.hdel(concat(key, subkey), toArray(fields));
}
}
代码示例来源:origin: suninformation/ymate-platform-v2
_holder.getCommands().hdel(__cacheName, _keys.toArray(new String[0]));
if (!__disabledSubscribeExpired) {
for (String _key : _keys) {
代码示例来源: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: suninformation/ymate-platform-v2
@Override
public void remove(Object key) throws CacheException {
IRedisCommandsHolder _holder = null;
try {
String _cacheKey = __doSerializeKey(key);
//
_holder = __redis.getDefaultCommandsHolder();
if (__storageWithSet) {
_holder.getCommands().hdel(__cacheName, _cacheKey);
//
if (!__disabledSubscribeExpired) {
_holder.getCommands().del(__cacheName.concat(__separator).concat(_cacheKey));
}
} else {
_holder.getCommands().del(__cacheName.concat(__separator).concat(_cacheKey));
}
//
if (__listener != null) {
__listener.notifyElementRemoved(__cacheName, _cacheKey);
}
} catch (Exception e) {
throw new CacheException(RuntimeUtils.unwrapThrow(e));
} finally {
if (_holder != null) {
_holder.release();
}
}
}
代码示例来源: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();
}
}
内容来源于网络,如有侵权,请联系作者删除!