io.quarkus.redis.runtime.datasource.HScanReactiveCursorImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-redis-client Show documentation
Show all versions of quarkus-redis-client Show documentation
Connect to Redis in either imperative or reactive style
package io.quarkus.redis.runtime.datasource;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import io.quarkus.redis.datasource.hash.ReactiveHashScanCursor;
import io.smallrye.mutiny.Multi;
import io.smallrye.mutiny.Uni;
import io.vertx.mutiny.redis.client.Command;
import io.vertx.mutiny.redis.client.Response;
public class HScanReactiveCursorImpl extends AbstractRedisCommands implements ReactiveHashScanCursor {
private final byte[] key;
private final Type typeOfField;
private final Type typeOfValue;
private long cursor;
private final List extra = new ArrayList<>();
public HScanReactiveCursorImpl(RedisCommandExecutor redis, K key, Marshaller marshaller, Type typeOfField,
Type typeOfValue,
List extra) {
super(redis, marshaller);
this.key = marshaller.encode(key);
this.typeOfField = typeOfField;
this.typeOfValue = typeOfValue;
this.cursor = INITIAL_CURSOR_ID;
this.extra.addAll(extra);
}
@Override
public boolean hasNext() {
return cursor != 0;
}
@Override
public Uni
© 2015 - 2025 Weber Informatics LLC | Privacy Policy