Introduce *scan with "string" cursor parameter to support unsigned long
cursor * overload all *scan method to change "int" cursor to "string" cursor * set @Deprecated and leave reason to deprecate and when to remove to current *scan method * modify unit tests to make it work with new *scan method
This commit is contained in:
@@ -523,18 +523,51 @@ public class ShardedJedis extends BinaryShardedJedis implements JedisCommands {
|
||||
return j.bitcount(key, start, end);
|
||||
}
|
||||
|
||||
@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 j = getShard(key);
|
||||
return j.hscan(key, cursor);
|
||||
}
|
||||
|
||||
@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<String> sscan(String key, int cursor) {
|
||||
Jedis j = getShard(key);
|
||||
return j.sscan(key, cursor);
|
||||
}
|
||||
|
||||
@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<Tuple> zscan(String key, int cursor) {
|
||||
Jedis j = getShard(key);
|
||||
return j.zscan(key, cursor);
|
||||
}
|
||||
|
||||
public ScanResult<Entry<String, String>> hscan(String key, final String cursor) {
|
||||
Jedis j = getShard(key);
|
||||
return j.hscan(key, cursor);
|
||||
}
|
||||
|
||||
public ScanResult<String> sscan(String key, final String cursor) {
|
||||
Jedis j = getShard(key);
|
||||
return j.sscan(key, cursor);
|
||||
}
|
||||
|
||||
public ScanResult<Tuple> zscan(String key, final String cursor) {
|
||||
Jedis j = getShard(key);
|
||||
return j.zscan(key, cursor);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user