|
|
|
@ -27,7 +27,7 @@ import org.redisson.client.codec.StringCodec;
|
|
|
|
|
import org.redisson.client.protocol.RedisCommand;
|
|
|
|
|
import org.redisson.client.protocol.RedisCommands;
|
|
|
|
|
import org.redisson.client.protocol.convertor.NumberConvertor;
|
|
|
|
|
import org.redisson.client.protocol.decoder.MapValueDecoder;
|
|
|
|
|
import org.redisson.client.protocol.decoder.*;
|
|
|
|
|
import org.redisson.command.CommandAsyncExecutor;
|
|
|
|
|
import org.redisson.command.CommandBatchService;
|
|
|
|
|
import org.redisson.connection.decoder.MapGetAllDecoder;
|
|
|
|
@ -1484,14 +1484,17 @@ public class RedissonMap<K, V> extends RedissonExpirable implements RMap<K, V> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public RFuture<ScanResult<Object>> scanKeyIteratorAsync(String name, RedisClient client, long startPos, String pattern, int count) {
|
|
|
|
|
List<Object> params = new ArrayList<Object>();
|
|
|
|
|
List<Object> params = new ArrayList<>();
|
|
|
|
|
params.add(startPos);
|
|
|
|
|
if (pattern != null) {
|
|
|
|
|
params.add(pattern);
|
|
|
|
|
}
|
|
|
|
|
params.add(count);
|
|
|
|
|
|
|
|
|
|
return commandExecutor.evalReadAsync(client, name, codec, RedisCommands.EVAL_SCAN,
|
|
|
|
|
RedisCommand<ListScanResult<Object>> evalScan = new RedisCommand<ListScanResult<Object>>("EVAL",
|
|
|
|
|
new ListMultiDecoder2(new ListScanResultReplayDecoder(), new ObjectDecoder<>(codec.getMapKeyDecoder())));
|
|
|
|
|
|
|
|
|
|
return commandExecutor.evalReadAsync(client, name, codec, evalScan,
|
|
|
|
|
"local result = {}; "
|
|
|
|
|
+ "local res; "
|
|
|
|
|
+ "if (#ARGV == 3) then "
|
|
|
|
|