@Override public Cursor<byte[]> sScan(byte[] key, ScanOptions options) { Assert.notNull(key, "Key must not be null!"); return new ScanCursor<byte[]>(options) { @Override protected ScanIteration<byte[]> doScan(long cursorId, ScanOptions options) { ScanParams params = JedisConverters.toScanParams(options); redis.clients.jedis.ScanResult<byte[]> result = connection.getCluster().sscan(key, JedisConverters.toBytes(cursorId), params); return new ScanIteration<>(Long.valueOf(result.getCursor()), result.getResult()); } }.open(); }
@Override public Cursor<byte[]> sScan(byte[] key, ScanOptions options) { Assert.notNull(key, "Key must not be null!"); return new ScanCursor<byte[]>(options) { @Override protected ScanIteration<byte[]> doScan(long cursorId, ScanOptions options) { ScanParams params = JedisConverters.toScanParams(options); redis.clients.jedis.ScanResult<byte[]> result = connection.getCluster().sscan(key, JedisConverters.toBytes(cursorId), params); return new ScanIteration<>(Long.valueOf(result.getStringCursor()), result.getResult()); } }.open(); }
@Override public Cursor<byte[]> sScan(byte[] key, ScanOptions options) { Assert.notNull(key, "Key must not be null!"); return new ScanCursor<byte[]>(options) { @Override protected ScanIteration<byte[]> doScan(long cursorId, ScanOptions options) { ScanParams params = JedisConverters.toScanParams(options); redis.clients.jedis.ScanResult<byte[]> result = connection.getCluster().sscan(key, JedisConverters.toBytes(cursorId), params); return new ScanIteration<>(Long.valueOf(result.getStringCursor()), result.getResult()); } }.open(); }