本文整理了Java中redis.clients.jedis.JedisCommands.hkeys()
方法的一些代码示例,展示了JedisCommands.hkeys()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JedisCommands.hkeys()
方法的具体详情如下:
包路径:redis.clients.jedis.JedisCommands
类名称:JedisCommands
方法名:hkeys
暂无
代码示例来源:origin: mpusher/mpush
/**
* 返回 key 指定的哈希集中所有字段的名字。
*
* @param key
* @return
*/
public Set<String> hkeys(String key) {
return call(jedis -> jedis.hkeys(key), Collections.<String>emptySet());
}
代码示例来源:origin: com.github.mpusher/mpush-cache
/**
* 返回 key 指定的哈希集中所有字段的名字。
*
* @param key
* @return
*/
public Set<String> hkeys(String key) {
return call(jedis -> jedis.hkeys(key), Collections.<String>emptySet());
}
代码示例来源:origin: com.gitee.qdbp/qdbp-general-biz
/** {@inheritDoc} **/
@Override
public Set<String> hkeys(String key, String subkey) {
JedisCommands jedis = this.getInstanceByKey(key);
return jedis.hkeys(concat(key, subkey));
}
代码示例来源:origin: com.gitee.zhaohuihua/bdp-general-svc
/** {@inheritDoc} **/
@Override
public Set<String> hkeys(String key, String subkey) {
JedisCommands jedis = this.getInstanceByKey(key);
return jedis.hkeys(concat(key, subkey));
}
代码示例来源:origin: com.netflix.spinnaker.orca/orca-redis
@Override
public void removeStage(@Nonnull Execution execution, @Nonnull String stageId) {
RedisClientDelegate delegate = getRedisDelegate(execution);
String key = executionKey(execution);
String indexKey = format("%s:stageIndex", key);
List<String> stageKeys = delegate.withCommandsClient(c -> {
return c.hkeys(key).stream()
.filter(k -> k.startsWith("stage." + stageId))
.collect(Collectors.toList());
});
delegate.withTransaction(tx -> {
tx.lrem(indexKey, 0, stageId);
tx.hdel(key, stageKeys.toArray(new String[0]));
tx.exec();
});
}
代码示例来源:origin: suninformation/ymate-platform-v2
@Override
public List<String> keys() throws CacheException {
IRedisCommandsHolder _holder = null;
try {
_holder = __redis.getDefaultCommandsHolder();
if (__storageWithSet) {
return new ArrayList<String>(_holder.getCommands().hkeys(__cacheName));
} else {
List<String> _returnValue = new ArrayList<String>();
String _keyPrefx = __cacheName.concat(__separator);
Set<String> _keys = _holder.getJedis().keys(_keyPrefx.concat("*"));
for (String _key : _keys) {
_returnValue.add(StringUtils.substringAfterLast(_key, _keyPrefx));
}
return _returnValue;
}
} catch (Exception e) {
throw new CacheException(RuntimeUtils.unwrapThrow(e));
} finally {
if (_holder != null) {
_holder.release();
}
}
}
代码示例来源:origin: suninformation/ymate-platform-v2
if (__storageWithSet) {
if (!__disabledSubscribeExpired) {
Set<String> _keys = _holder.getCommands().hkeys(__cacheName);
for (String _key : _keys) {
_holder.getCommands().del(__cacheName.concat(__separator).concat(_key));
内容来源于网络,如有侵权,请联系作者删除!