redis.clients.jedis.Jedis.hscan()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(328)

本文整理了Java中redis.clients.jedis.Jedis.hscan()方法的一些代码示例,展示了Jedis.hscan()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Jedis.hscan()方法的具体详情如下:
包路径:redis.clients.jedis.Jedis
类名称:Jedis
方法名:hscan

Jedis.hscan介绍

暂无

代码示例

代码示例来源:origin: apache/storm

@Override
public ScanResult<Map.Entry<byte[], byte[]>> hscan(byte[] key, byte[] cursor, ScanParams params) {
  return jedis.hscan(key, cursor, params);
}

代码示例来源:origin: sohutv/cachecloud

@Override
 public ScanResult<Entry<String, String>> execute(Jedis connection) {
  return connection.hscan(key, cursor);
 }
}.run(key);

代码示例来源:origin: sohutv/cachecloud

@Override
public ScanResult<Entry<String, String>> hscan(String key, final String cursor) {
 Jedis j = getShard(key);
 return j.hscan(key, cursor);
}

代码示例来源:origin: sohutv/cachecloud

@Override
public ScanResult<Entry<String, String>> hscan(String key, String cursor, ScanParams params) {
 Jedis j = getShard(key);
 return j.hscan(key, cursor, params);
}

代码示例来源:origin: sohutv/cachecloud

@Override
public ScanResult<Map.Entry<String, String>> hscan(final String key, final String cursor) {
 return hscan(key, cursor, new ScanParams());
}

代码示例来源:origin: Netflix/conductor

@Override
@Deprecated
public ScanResult<Entry<String, String>> hscan(String key, int cursor) {
 Jedis jedis = null;
  try {
   jedis = jedisPool.getResource();
   return jedis.hscan(key, cursor);
  } finally {
   if (jedis != null)
    jedis.close();
  }
}

代码示例来源:origin: Netflix/conductor

@Override
public ScanResult<Entry<String, String>> hscan(String key, String cursor) {
 Jedis jedis = null;
  try {
   jedis = jedisPool.getResource();
   return jedis.hscan(key, cursor);
  } finally {
   if (jedis != null)
    jedis.close();
  }
}

代码示例来源:origin: Netflix/conductor

@Override
public ScanResult<Entry<String, String>> hscan(String key, String cursor, ScanParams params) {
 Jedis jedis = null;
  try {
   jedis = jedisPool.getResource();
   return jedis.hscan(key, cursor, params);
  } finally {
   if (jedis != null)
    jedis.close();
  }
}

代码示例来源:origin: spring-projects/spring-data-redis

@Override
protected ScanIteration<Entry<byte[], byte[]>> doScan(byte[] key, long cursorId, ScanOptions options) {
  if (isQueueing() || isPipelined()) {
    throw new UnsupportedOperationException("'HSCAN' cannot be called in pipeline / transaction mode.");
  }
  ScanParams params = JedisConverters.toScanParams(options);
  ScanResult<Entry<byte[], byte[]>> result = connection.getJedis().hscan(key, JedisConverters.toBytes(cursorId),
      params);
  return new ScanIteration<>(Long.valueOf(result.getCursor()), result.getResult());
}

代码示例来源:origin: io.leopard/leopard-redis

@Override
  public Object execute(Jedis jedis) {
    return jedis.hscan(key, cursor);
  }
});

代码示例来源:origin: io.leopard/leopard-redis

@SuppressWarnings("deprecation")
@Override
public ScanResult<Entry<String, String>> hscan(String key, int cursor, ScanParams params) {
  return jedis.hscan(key, cursor, params);
}

代码示例来源:origin: com.netflix.spinnaker.kork/kork-jedis

@Override
public ScanResult<Map.Entry<String, String>> hscan(String key, String cursor, ScanParams params) {
 String command = "hscan";
 return instrumented(command, () -> delegated.hscan(key, cursor, params));
}

代码示例来源:origin: com.netflix.spinnaker.kork/kork-jedis

@Override
public ScanResult<Map.Entry<byte[], byte[]>> hscan(byte[] key, byte[] cursor) {
 String command = "hscan";
 return instrumented(command, () -> delegated.hscan(key, cursor));
}

代码示例来源:origin: org.nutz/nutz-integration-jedis

@Deprecated
/**
 * This method is deprecated due to bug (scan cursor should be unsigned long)
 * And will be removed on next major release
 * @see https://github.com/xetorthio/jedis/issues/531
 */
public ScanResult<Entry<String, String>> hscan(String key, int cursor) {
  Jedis jedis = getJedis();
  try {
    return jedis.hscan(key, cursor);
  } finally {Streams.safeClose(jedis);}
}

代码示例来源:origin: org.nutz/nutz-integration-jedis

public ScanResult<Entry<byte[], byte[]>> hscan(byte[] key, byte[] cursor, ScanParams params) {
  Jedis jedis = getJedis();
  try {
    return jedis.hscan(key, cursor, params);
  } finally {Streams.safeClose(jedis);}
}

代码示例来源:origin: org.nutz/nutz-integration-jedis

public ScanResult<Entry<String, String>> hscan(String key, String cursor) {
  Jedis jedis = getJedis();
  try {
    return jedis.hscan(key, cursor);
  } finally {Streams.safeClose(jedis);}
}

代码示例来源:origin: com.netflix.conductor/conductor-redis-persistence

@Override
public ScanResult<Entry<String, String>> hscan(String key, String cursor) {
 Jedis jedis = null;
  try {
   jedis = jedisPool.getResource();
   return jedis.hscan(key, cursor);
  } finally {
   if (jedis != null)
    jedis.close();
  }
}

代码示例来源:origin: com.netflix.conductor/conductor-redis-persistence

@Override
public ScanResult<Entry<String, String>> hscan(String key, String cursor, ScanParams params) {
 Jedis jedis = null;
  try {
   jedis = jedisPool.getResource();
   return jedis.hscan(key, cursor, params);
  } finally {
   if (jedis != null)
    jedis.close();
  }
}

代码示例来源:origin: io.enoa/nosql-redis

default <T> ScanResult<Map.Entry<String, T>> hscan(String key, String cursor, ScanParams params) {
 return this.run((jedis, serializer) -> {
  ScanResult<Map.Entry<byte[], byte[]>> data = jedis.hscan(SafeEncoder.encode(key), SafeEncoder.encode(cursor), params);
  List<Map.Entry<String, T>> res = data.getResult().stream()
   .map(EnoaRedisConvert.with(serializer)::<T>convertEntry)
   .collect(Collectors.toList());
  return new ScanResult<>(data.getCursorAsBytes(), res);
 });
}
// fixme jedis client does not have this api

代码示例来源:origin: org.springframework.data/spring-data-redis

@Override
protected ScanIteration<Entry<byte[], byte[]>> doScan(byte[] key, long cursorId, ScanOptions options) {
  if (isQueueing() || isPipelined()) {
    throw new UnsupportedOperationException("'HSCAN' cannot be called in pipeline / transaction mode.");
  }
  ScanParams params = JedisConverters.toScanParams(options);
  ScanResult<Entry<byte[], byte[]>> result = connection.getJedis().hscan(key, JedisConverters.toBytes(cursorId),
      params);
  return new ScanIteration<>(Long.valueOf(result.getStringCursor()), result.getResult());
}

相关文章

Jedis类方法