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