本文整理了Java中redis.clients.jedis.Jedis.hkeys()
方法的一些代码示例,展示了Jedis.hkeys()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Jedis.hkeys()
方法的具体详情如下:
包路径:redis.clients.jedis.Jedis
类名称:Jedis
方法名:hkeys
[英]Return all the fields in a hash.
Time complexity: O(N), where N is the total number of entries
[中]返回散列中的所有字段。
时间复杂度:O(N),其中N是条目的总数
代码示例来源:origin: sohutv/cachecloud
@Override
public Set<byte[]> execute(Jedis connection) {
return connection.hkeys(key);
}
}.runBinary(key);
代码示例来源:origin: sohutv/cachecloud
@Override
public Set<String> execute(Jedis connection) {
return connection.hkeys(key);
}
}.run(key);
代码示例来源:origin: sohutv/cachecloud
@Override
public Set<String> hkeys(String key) {
Jedis j = getShard(key);
return j.hkeys(key);
}
代码示例来源:origin: sohutv/cachecloud
@Override
public Set<byte[]> hkeys(byte[] key) {
Jedis j = getShard(key);
return j.hkeys(key);
}
代码示例来源:origin: sohutv/cachecloud
public Set<byte[]> execute(Jedis connection) {
return connection.hkeys(SafeEncoder.encode(key));
}
}.runBinary(keyByte);
代码示例来源:origin: caoxinyu/RedisClient
@Override
protected void command() {
jedis.select(db);
Set<String> fields = jedis.hkeys(key);
exist = fields.contains(field);
}
代码示例来源:origin: Netflix/conductor
@Override
public Set<String> hkeys(String key) {
Jedis jedis = null;
try {
jedis = jedisPool.getResource();
return jedis.hkeys(key);
} finally {
if (jedis != null)
jedis.close();
}
}
代码示例来源:origin: jfinal/jfinal
/**
* 返回哈希表 key 中的所有域。
* 底层实现此方法取名为 hfields 更为合适,在此仅为与底层保持一致
*/
public Set<Object> hkeys(Object key) {
Jedis jedis = getJedis();
try {
Set<byte[]> fieldSet = jedis.hkeys(keyToBytes(key));
Set<Object> result = new HashSet<Object>();
fieldSetFromBytesSet(fieldSet, result);
return result;
}
finally {close(jedis);}
}
代码示例来源:origin: spring-projects/spring-data-redis
@Override
public Set<byte[]> hKeys(byte[] key) {
Assert.notNull(key, "Key must not be null!");
try {
if (isPipelined()) {
pipeline(connection.newJedisResult(connection.getRequiredPipeline().hkeys(key)));
return null;
}
if (isQueueing()) {
transaction(connection.newJedisResult(connection.getRequiredTransaction().hkeys(key)));
return null;
}
return connection.getJedis().hkeys(key);
} catch (Exception ex) {
throw convertJedisAccessException(ex);
}
}
代码示例来源:origin: spinnaker/kayenta
Set<String> oldMapByApplicationKeys = jedis.hkeys(mapByApplicationKey);
Set<String> byApplicationKeysToDelete = new HashSet<>();
代码示例来源:origin: io.leopard/leopard-redis
@Override
public Object execute(Jedis jedis) {
return jedis.hkeys(key);
}
});
代码示例来源:origin: tangyanbo/springmore
@Override
public Set<String> action(Jedis jedis) {
return jedis.hkeys(key);
}
});
代码示例来源:origin: com.netflix.spinnaker.kork/kork-jedis
@Override
public Set<String> hkeys(String key) {
String command = "hkeys";
return instrumented(command, () -> delegated.hkeys(key));
}
代码示例来源:origin: com.netflix.spinnaker.kork/kork-jedis
@Override
public Set<byte[]> hkeys(byte[] key) {
String command = "hkeys";
return instrumented(command, () -> delegated.hkeys(key));
}
代码示例来源:origin: com.intoverflow.booster/booster-core
@Override
public Set<Object> keys() {
Set<byte[]> keys = redisContext.call(jedis -> jedis.hkeys(nameBytes));
Set<Object> set = new LinkedHashSet<>();
for (byte[] key : keys) {
set.add(deserialize(key));
}
return set;
}
代码示例来源:origin: com.netflix.conductor/conductor-redis-persistence
@Override
public Set<String> hkeys(String key) {
Jedis jedis = null;
try {
jedis = jedisPool.getResource();
return jedis.hkeys(key);
} finally {
if (jedis != null)
jedis.close();
}
}
代码示例来源:origin: xetorthio/johm
public Set<String> hkeys() {
Jedis jedis = getResource();
Set<String> hkeys = jedis.hkeys(key());
returnResource(jedis);
return hkeys;
}
代码示例来源:origin: xiancloud/xian
@Override
public void execute(UnitRequest msg, Handler<UnitResponse> handler) throws Exception {
String key = msg.getArgMap().get("key").toString();
CacheConfigBean cacheConfigBean = msg.get("cacheConfig", CacheConfigBean.class);
Set<String> keys = Redis.call(cacheConfigBean, jedis -> jedis.hkeys(key));
handler.handle(UnitResponse.createSuccess(keys));
}
代码示例来源:origin: xetorthio/rmq
public Set<String> hkeys() {
Jedis jedis = getResource();
Set<String> hkeys = jedis.hkeys(key());
returnResource(jedis);
return hkeys;
}
代码示例来源:origin: com.github.sogyf/goja-jfinal
/**
* 返回哈希表 key 中的所有域。
*/
public Set<String> hkeys(Object key) {
Jedis jedis = getJedis();
try {
Set<byte[]> keySet = jedis.hkeys(keyToBytes(key));
return keySetFromBytesSet(keySet); // 返回 key 的方法不能使用 valueSetFromBytesSet(...)
}
finally {close(jedis);}
}
内容来源于网络,如有侵权,请联系作者删除!