本文整理了Java中redis.clients.jedis.Jedis.hvals()
方法的一些代码示例,展示了Jedis.hvals()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Jedis.hvals()
方法的具体详情如下:
包路径:redis.clients.jedis.Jedis
类名称:Jedis
方法名:hvals
[英]Return all the values in a hash.
Time complexity: O(N), where N is the total number of entries
[中]返回散列中的所有值。
时间复杂度:O(N),其中N是条目的总数
代码示例来源:origin: sohutv/cachecloud
@Override
public Collection<byte[]> execute(Jedis connection) {
return connection.hvals(key);
}
}.runBinary(key);
代码示例来源:origin: sohutv/cachecloud
@Override
public List<String> execute(Jedis connection) {
return connection.hvals(key);
}
}.run(key);
代码示例来源:origin: sohutv/cachecloud
public List<byte[]> execute(Jedis connection) {
return connection.hvals(keyByte);
}
}.runBinary(keyByte);
代码示例来源:origin: sohutv/cachecloud
@Override
public List<String> hvals(String key) {
Jedis j = getShard(key);
return j.hvals(key);
}
代码示例来源:origin: sohutv/cachecloud
@Override
public Collection<byte[]> hvals(byte[] key) {
Jedis j = getShard(key);
return j.hvals(key);
}
代码示例来源:origin: Netflix/conductor
@Override
public List<String> hvals(String key) {
Jedis jedis = null;
try {
jedis = jedisPool.getResource();
return jedis.hvals(key);
} finally {
if (jedis != null)
jedis.close();
}
}
代码示例来源:origin: jfinal/jfinal
/**
* 返回哈希表 key 中所有域的值。
*/
@SuppressWarnings("rawtypes")
public List hvals(Object key) {
Jedis jedis = getJedis();
try {
List<byte[]> data = jedis.hvals(keyToBytes(key));
return valueListFromBytesList(data);
}
finally {close(jedis);}
}
代码示例来源:origin: spring-projects/spring-data-redis
@Override
public List<byte[]> hVals(byte[] key) {
Assert.notNull(key, "Key must not be null!");
try {
if (isPipelined()) {
pipeline(connection.newJedisResult(connection.getRequiredPipeline().hvals(key)));
return null;
}
if (isQueueing()) {
transaction(connection.newJedisResult(connection.getRequiredTransaction().hvals(key)));
return null;
}
return connection.getJedis().hvals(key);
} catch (Exception ex) {
throw convertJedisAccessException(ex);
}
}
代码示例来源:origin: jwpttcg66/NettyGameServer
public List<String> hvals(String key){
Jedis jedis = null;
boolean sucess = true;
try {
jedis = jedisPool.getResource();
return jedis.hvals(key);
} catch (Exception e) {
sucess = false;
returnBrokenResource(jedis, "hvals", e);
} finally {
if (sucess && jedis != null) {
returnResource(jedis);
}
}
return null;
}
public boolean hexists(String key , String field){
代码示例来源:origin: spinnaker/kayenta
public Set<Map<String, Object>> getCanaryConfigSummarySet(AccountCredentials credentials, List<String> applications) {
String accountName = credentials.getName();
String mapByApplicationKey = "kayenta:" + credentials.getType() + ":" + accountName + MAP_BY_APPLICATION_KEY_SUFFIX;
Set<Map<String, Object>> canaryConfigSummarySet = new HashSet<>();
try (Jedis jedis = jedisPool.getResource()) {
if (jedis.exists(mapByApplicationKey)) {
if (applications != null && applications.size() > 0) {
// If any applications were specified, populate the response with all of the canary configs scoped to those applications.
for (String application : applications) {
String appScopedCanaryConfigListJson = jedis.hget(mapByApplicationKey, application);
populateCanaryConfigSummarySet(mapByApplicationKey, canaryConfigSummarySet, appScopedCanaryConfigListJson);
}
} else {
// No applications were specified so populate the response with all persisted canary configs.
List<String> allAppScopedCanaryConfigListJson = jedis.hvals(mapByApplicationKey);
for (String appScopedCanaryConfigListJson : allAppScopedCanaryConfigListJson) {
populateCanaryConfigSummarySet(mapByApplicationKey, canaryConfigSummarySet, appScopedCanaryConfigListJson);
}
}
} else {
throw new IllegalArgumentException("Canary config index not ready.");
}
populateWithPendingUpdates(credentials, accountName, jedis, canaryConfigSummarySet, applications);
}
return canaryConfigSummarySet;
}
代码示例来源:origin: io.leopard/leopard-redis
@Override
public Object execute(Jedis jedis) {
return jedis.hvals(key);
}
});
代码示例来源:origin: com.github.sogyf/goja-mvt
@Override
public List<String> action(Jedis jedis) {
return jedis.hvals(key);
}
});
代码示例来源:origin: apache/servicemix-bundles
@Override
public List<String> execute(Jedis connection) {
return connection.hvals(key);
}
}.run(key);
代码示例来源:origin: com.netflix.spinnaker.kork/kork-jedis
@Override
public List<byte[]> hvals(byte[] key) {
String command = "hvals";
return instrumented(command, () -> delegated.hvals(key));
}
代码示例来源:origin: com.netflix.spinnaker.kork/kork-jedis
@Override
public List<String> hvals(String key) {
String command = "hvals";
return instrumented(command, () -> delegated.hvals(key));
}
代码示例来源:origin: com.netflix.conductor/conductor-redis-persistence
@Override
public List<String> hvals(String key) {
Jedis jedis = null;
try {
jedis = jedisPool.getResource();
return jedis.hvals(key);
} finally {
if (jedis != null)
jedis.close();
}
}
代码示例来源: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);
List<String> values = Redis.call(cacheConfigBean, jedis -> jedis.hvals(key));
handler.handle(UnitResponse.createSuccess(values));
}
代码示例来源:origin: com.github.sogyf/goja-jfinal
/**
* 返回哈希表 key 中所有域的值。
*/
@SuppressWarnings("rawtypes")
public List hvals(Object key) {
Jedis jedis = getJedis();
try {
List<byte[]> data = jedis.hvals(keyToBytes(key));
return valueListFromBytesList(data);
}
finally {close(jedis);}
}
代码示例来源:origin: com.jfinal/jfinal
/**
* 返回哈希表 key 中所有域的值。
*/
@SuppressWarnings("rawtypes")
public List hvals(Object key) {
Jedis jedis = getJedis();
try {
List<byte[]> data = jedis.hvals(keyToBytes(key));
return valueListFromBytesList(data);
}
finally {close(jedis);}
}
代码示例来源:origin: yangfuhai/jboot
/**
* 返回哈希表 key 中所有域的值。
*/
@SuppressWarnings("rawtypes")
public List hvals(Object key) {
Jedis jedis = getJedis();
try {
List<byte[]> data = jedis.hvals(keyToBytes(key));
return valueListFromBytesList(data);
} finally {
returnResource(jedis);
}
}
内容来源于网络,如有侵权,请联系作者删除!