Class RedisGraph

    • Constructor Detail

      • RedisGraph

        public RedisGraph()
        Creates a client running on the local machine
      • RedisGraph

        public RedisGraph​(String host,
                          int port)
        Creates a client running on the specific host/post
        Parameters:
        host - Redis host
        port - Redis port
      • RedisGraph

        public RedisGraph​(redis.clients.jedis.util.Pool<redis.clients.jedis.Jedis> jedis)
        Creates a client using provided Jedis pool
        Parameters:
        jedis - bring your own Jedis pool
    • Method Detail

      • getConnection

        protected redis.clients.jedis.Jedis getConnection()
        Overrides the abstract function. Gets and returns a Jedis connection from the Jedis pool
        Specified by:
        getConnection in class AbstractRedisGraph
        Returns:
        a Jedis connection
      • sendQuery

        protected ResultSet sendQuery​(String graphId,
                                      String preparedQuery)
        Overrides the abstract function. Sends the query from any Jedis connection received from the Jedis pool and closes it once done
        Specified by:
        sendQuery in class AbstractRedisGraph
        Parameters:
        graphId - graph to be queried
        preparedQuery - prepared query
        Returns:
        Result set with the query answer
      • sendReadOnlyQuery

        protected ResultSet sendReadOnlyQuery​(String graphId,
                                              String preparedQuery)
        Overrides the abstract function. Sends the read-only query from any Jedis connection received from the Jedis pool and closes it once done
        Specified by:
        sendReadOnlyQuery in class AbstractRedisGraph
        Parameters:
        graphId - graph to be queried
        preparedQuery - prepared query
        Returns:
        Result set with the query answer
      • sendQuery

        protected ResultSet sendQuery​(String graphId,
                                      String preparedQuery,
                                      long timeout)
        Overrides the abstract function. Sends the query from any Jedis connection received from the Jedis pool and closes it once done
        Specified by:
        sendQuery in class AbstractRedisGraph
        Parameters:
        graphId - graph to be queried
        preparedQuery - prepared query
        timeout -
        Returns:
        Result set with the query answer
      • sendReadOnlyQuery

        protected ResultSet sendReadOnlyQuery​(String graphId,
                                              String preparedQuery,
                                              long timeout)
        Overrides the abstract function. Sends the read-only query from any Jedis connection received from the Jedis pool and closes it once done
        Specified by:
        sendReadOnlyQuery in class AbstractRedisGraph
        Parameters:
        graphId - graph to be queried
        preparedQuery - prepared query
        timeout -
        Returns:
        Result set with the query answer
      • deleteGraph

        public String deleteGraph​(String graphId)
        Deletes the entire graph
        Specified by:
        deleteGraph in interface RedisGraph
        Parameters:
        graphId - graph to delete
        Returns:
        delete running time statistics