All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkus.redis.runtime.datasource.BlockingGraphCommandsImpl Maven / Gradle / Ivy

There is a newer version: 3.17.5
Show newest version
package io.quarkus.redis.runtime.datasource;

import java.time.Duration;
import java.util.List;
import java.util.Map;

import io.quarkus.redis.datasource.RedisDataSource;
import io.quarkus.redis.datasource.graph.GraphCommands;
import io.quarkus.redis.datasource.graph.GraphQueryResponseItem;
import io.quarkus.redis.datasource.graph.ReactiveGraphCommands;

public class BlockingGraphCommandsImpl extends AbstractRedisCommandGroup implements GraphCommands {

    private final ReactiveGraphCommands reactive;

    public BlockingGraphCommandsImpl(RedisDataSource ds, ReactiveGraphCommands reactive, Duration timeout) {
        super(ds, timeout);
        this.reactive = reactive;
    }

    @Override
    public void graphDelete(K key) {
        reactive.graphDelete(key).await().atMost(timeout);
    }

    @Override
    public String graphExplain(K key, String query) {
        return reactive.graphExplain(key, query).await().atMost(timeout);
    }

    @Override
    public List graphList() {
        return reactive.graphList().await().atMost(timeout);
    }

    @Override
    public List> graphQuery(K key, String query) {
        return reactive.graphQuery(key, query).await().atMost(timeout);
    }

    @Override
    public List> graphQuery(K key, String query, Duration timeout) {
        return reactive.graphQuery(key, query, timeout).await().atMost(this.timeout);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy