Class AbstractRedisGraph

    • Constructor Detail

      • AbstractRedisGraph

        public AbstractRedisGraph()
    • Method Detail

      • getConnection

        protected abstract redis.clients.jedis.Jedis getConnection()
        Inherited classes should return a Jedis connection, with respect to their context
        Returns:
        Jedis connection
      • sendQuery

        protected abstract ResultSet sendQuery​(String graphId,
                                               String preparedQuery)
        Sends a query to the redis graph. Implementation and context dependent
        Parameters:
        graphId - graph to be queried
        preparedQuery - prepared query
        Returns:
        Result set
      • sendReadOnlyQuery

        protected abstract ResultSet sendReadOnlyQuery​(String graphId,
                                                       String preparedQuery)
        Sends a read-only query to the redis graph. Implementation and context dependent
        Parameters:
        graphId - graph to be queried
        preparedQuery - prepared query
        Returns:
        Result set
      • sendQuery

        protected abstract ResultSet sendQuery​(String graphId,
                                               String preparedQuery,
                                               long timeout)
        Sends a query to the redis graph.Implementation and context dependent
        Parameters:
        graphId - graph to be queried
        preparedQuery - prepared query
        timeout -
        Returns:
        Result set
      • sendReadOnlyQuery

        protected abstract ResultSet sendReadOnlyQuery​(String graphId,
                                                       String preparedQuery,
                                                       long timeout)
        Sends a read-query to the redis graph.Implementation and context dependent
        Parameters:
        graphId - graph to be queried
        preparedQuery - prepared query
        timeout -
        Returns:
        Result set
      • query

        public ResultSet query​(String graphId,
                               String query)
        Execute a Cypher query.
        Specified by:
        query in interface RedisGraph
        Parameters:
        graphId - a graph to perform the query on
        query - Cypher query
        Returns:
        a result set
      • readOnlyQuery

        public ResultSet readOnlyQuery​(String graphId,
                                       String query)
        Execute a Cypher read-only query.
        Specified by:
        readOnlyQuery in interface RedisGraph
        Parameters:
        graphId - a graph to perform the query on
        query - Cypher query
        Returns:
        a result set
      • query

        public ResultSet query​(String graphId,
                               String query,
                               long timeout)
        Execute a Cypher query with timeout.
        Specified by:
        query in interface RedisGraph
        Parameters:
        graphId - a graph to perform the query on
        timeout -
        query - Cypher query
        Returns:
        a result set
      • readOnlyQuery

        public ResultSet readOnlyQuery​(String graphId,
                                       String query,
                                       long timeout)
        Execute a Cypher read-only query with timeout.
        Specified by:
        readOnlyQuery in interface RedisGraph
        Parameters:
        graphId - a graph to perform the query on
        timeout -
        query - Cypher query
        Returns:
        a result set
      • query

        public ResultSet query​(String graphId,
                               String query,
                               Map<String,​Object> params)
        Executes a cypher query with parameters.
        Specified by:
        query in interface RedisGraph
        Parameters:
        graphId - a graph to perform the query on.
        query - Cypher query.
        params - parameters map.
        Returns:
        a result set.
      • readOnlyQuery

        public ResultSet readOnlyQuery​(String graphId,
                                       String query,
                                       Map<String,​Object> params)
        Executes a cypher read-only query with parameters.
        Specified by:
        readOnlyQuery in interface RedisGraph
        Parameters:
        graphId - a graph to perform the query on.
        query - Cypher query.
        params - parameters map.
        Returns:
        a result set.
      • query

        public ResultSet query​(String graphId,
                               String query,
                               Map<String,​Object> params,
                               long timeout)
        Executes a cypher query with parameters and timeout.
        Specified by:
        query in interface RedisGraph
        Parameters:
        graphId - a graph to perform the query on.
        timeout -
        query - Cypher query.
        params - parameters map.
        Returns:
        a result set.
      • readOnlyQuery

        public ResultSet readOnlyQuery​(String graphId,
                                       String query,
                                       Map<String,​Object> params,
                                       long timeout)
        Executes a cypher read-only query with parameters and timeout.
        Specified by:
        readOnlyQuery in interface RedisGraph
        Parameters:
        graphId - a graph to perform the query on.
        timeout -
        query - Cypher query.
        params - parameters map.
        Returns:
        a result set.
      • callProcedure

        public ResultSet callProcedure​(String graphId,
                                       String procedure)
        Description copied from interface: RedisGraph
        Invokes stored procedures without arguments
        Specified by:
        callProcedure in interface RedisGraph
        Parameters:
        graphId - a graph to perform the query on
        procedure - procedure name to invoke
        Returns:
        result set with the procedure data
      • callProcedure

        public ResultSet callProcedure​(String graphId,
                                       String procedure,
                                       List<String> args)
        Description copied from interface: RedisGraph
        Invokes stored procedure with arguments
        Specified by:
        callProcedure in interface RedisGraph
        Parameters:
        graphId - a graph to perform the query on
        procedure - procedure name to invoke
        args - procedure arguments
        Returns:
        result set with the procedure data
      • callProcedure

        public ResultSet callProcedure​(String graphId,
                                       String procedure,
                                       List<String> args,
                                       Map<String,​List<String>> kwargs)
        Description copied from interface: RedisGraph
        Invoke a stored procedure
        Specified by:
        callProcedure in interface RedisGraph
        Parameters:
        graphId - a graph to perform the query on
        procedure - - procedure to execute
        args - - procedure arguments
        kwargs - - procedure output arguments
        Returns:
        result set with the procedure data