Class AbstractRedisGraph
- java.lang.Object
-
- com.redislabs.redisgraph.impl.api.AbstractRedisGraph
-
- All Implemented Interfaces:
RedisGraph
,Closeable
,AutoCloseable
- Direct Known Subclasses:
ContextedRedisGraph
,RedisGraph
public abstract class AbstractRedisGraph extends Object implements RedisGraph
An abstract class to handle non implementation specific user requests
-
-
Constructor Summary
Constructors Constructor Description AbstractRedisGraph()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ResultSet
callProcedure(String graphId, String procedure)
Invokes stored procedures without argumentsResultSet
callProcedure(String graphId, String procedure, List<String> args)
Invokes stored procedure with argumentsResultSet
callProcedure(String graphId, String procedure, List<String> args, Map<String,List<String>> kwargs)
Invoke a stored procedureprotected abstract redis.clients.jedis.Jedis
getConnection()
Inherited classes should return a Jedis connection, with respect to their contextResultSet
query(String graphId, String query)
Execute a Cypher query.ResultSet
query(String graphId, String query, long timeout)
Execute a Cypher query with timeout.ResultSet
query(String graphId, String query, Object... args)
Deprecated.usequery(String, String, Map)
instead.ResultSet
query(String graphId, String query, Map<String,Object> params)
Executes a cypher query with parameters.ResultSet
query(String graphId, String query, Map<String,Object> params, long timeout)
Executes a cypher query with parameters and timeout.ResultSet
readOnlyQuery(String graphId, String query)
Execute a Cypher read-only query.ResultSet
readOnlyQuery(String graphId, String query, long timeout)
Execute a Cypher read-only query with timeout.ResultSet
readOnlyQuery(String graphId, String query, Map<String,Object> params)
Executes a cypher read-only query with parameters.ResultSet
readOnlyQuery(String graphId, String query, Map<String,Object> params, long timeout)
Executes a cypher read-only query with parameters and timeout.protected abstract ResultSet
sendQuery(String graphId, String preparedQuery)
Sends a query to the redis graph.protected abstract ResultSet
sendQuery(String graphId, String preparedQuery, long timeout)
Sends a query to the redis graph.Implementation and context dependentprotected abstract ResultSet
sendReadOnlyQuery(String graphId, String preparedQuery)
Sends a read-only query to the redis graph.protected abstract ResultSet
sendReadOnlyQuery(String graphId, String preparedQuery, long timeout)
Sends a read-query to the redis graph.Implementation and context dependent-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.redislabs.redisgraph.RedisGraph
close, deleteGraph
-
-
-
-
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 queriedpreparedQuery
- 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 queriedpreparedQuery
- 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 queriedpreparedQuery
- prepared querytimeout
-- 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 queriedpreparedQuery
- prepared querytimeout
-- Returns:
- Result set
-
query
public ResultSet query(String graphId, String query)
Execute a Cypher query.- Specified by:
query
in interfaceRedisGraph
- Parameters:
graphId
- a graph to perform the query onquery
- Cypher query- Returns:
- a result set
-
readOnlyQuery
public ResultSet readOnlyQuery(String graphId, String query)
Execute a Cypher read-only query.- Specified by:
readOnlyQuery
in interfaceRedisGraph
- Parameters:
graphId
- a graph to perform the query onquery
- 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 interfaceRedisGraph
- Parameters:
graphId
- a graph to perform the query ontimeout
-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 interfaceRedisGraph
- Parameters:
graphId
- a graph to perform the query ontimeout
-query
- Cypher query- Returns:
- a result set
-
query
@Deprecated public ResultSet query(String graphId, String query, Object... args)
Deprecated.usequery(String, String, Map)
instead.Execute a Cypher query with arguments- Specified by:
query
in interfaceRedisGraph
- Parameters:
graphId
- a graph to perform the query onquery
- Cypher queryargs
-- 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 interfaceRedisGraph
- 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 interfaceRedisGraph
- 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 interfaceRedisGraph
- 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 interfaceRedisGraph
- 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 interfaceRedisGraph
- Parameters:
graphId
- a graph to perform the query onprocedure
- 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 interfaceRedisGraph
- Parameters:
graphId
- a graph to perform the query onprocedure
- procedure name to invokeargs
- 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 interfaceRedisGraph
- Parameters:
graphId
- a graph to perform the query onprocedure
- - procedure to executeargs
- - procedure argumentskwargs
- - procedure output arguments- Returns:
- result set with the procedure data
-
-