|
|
|
@ -26,6 +26,12 @@ import org.redisson.client.protocol.decoder.ScanObjectEntry;
|
|
|
|
|
|
|
|
|
|
import io.netty.buffer.ByteBuf;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @author Nikita Koksharov
|
|
|
|
|
*
|
|
|
|
|
* @param <V> value type
|
|
|
|
|
*/
|
|
|
|
|
abstract class RedissonBaseIterator<V> implements Iterator<V> {
|
|
|
|
|
|
|
|
|
|
private List<ByteBuf> firstValues;
|
|
|
|
@ -112,8 +118,7 @@ abstract class RedissonBaseIterator<V> implements Iterator<V> {
|
|
|
|
|
}
|
|
|
|
|
finished = true;
|
|
|
|
|
return false;
|
|
|
|
|
} else if (!firstValues.isEmpty()) {
|
|
|
|
|
if (res.getPos() == 0) {
|
|
|
|
|
} else if (lastValues.isEmpty() && res.getPos() == 0) {
|
|
|
|
|
if (tryAgain()) {
|
|
|
|
|
client = null;
|
|
|
|
|
firstValues = null;
|
|
|
|
@ -126,7 +131,6 @@ abstract class RedissonBaseIterator<V> implements Iterator<V> {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
lastIter = res.getValues().iterator();
|
|
|
|
|
nextIterPos = res.getPos();
|
|
|
|
|
} while (!lastIter.hasNext() && nextIterPos != prevIterPos);
|
|
|
|
|