Skip to content

Commit 155acfd

Browse files
authored
Deprecate RedisGraph support (#3504)
* Deprecate Redis Graph support * in RedisGraphPipelineCommands
1 parent c9f4dee commit 155acfd

20 files changed

+117
-7
lines changed

src/main/java/redis/clients/jedis/CommandObjects.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4187,26 +4187,32 @@ public final CommandObject<List<Double>> tdigestByRevRank(String key, long... ra
41874187
// RedisBloom commands
41884188

41894189
// RedisGraph commands
4190+
@Deprecated
41904191
public final CommandObject<List<String>> graphList() {
41914192
return new CommandObject<>(commandArguments(GraphCommand.LIST), BuilderFactory.STRING_LIST);
41924193
}
41934194

4195+
@Deprecated
41944196
public final CommandObject<List<String>> graphProfile(String graphName, String query) {
41954197
return new CommandObject<>(commandArguments(GraphCommand.PROFILE).key(graphName).add(query), BuilderFactory.STRING_LIST);
41964198
}
41974199

4200+
@Deprecated
41984201
public final CommandObject<List<String>> graphExplain(String graphName, String query) {
41994202
return new CommandObject<>(commandArguments(GraphCommand.EXPLAIN).key(graphName).add(query), BuilderFactory.STRING_LIST);
42004203
}
42014204

4205+
@Deprecated
42024206
public final CommandObject<List<List<Object>>> graphSlowlog(String graphName) {
42034207
return new CommandObject<>(commandArguments(GraphCommand.SLOWLOG).key(graphName), BuilderFactory.ENCODED_OBJECT_LIST_LIST);
42044208
}
42054209

4210+
@Deprecated
42064211
public final CommandObject<String> graphConfigSet(String configName, Object value) {
42074212
return new CommandObject<>(commandArguments(GraphCommand.CONFIG).add(GraphKeyword.SET).add(configName).add(value), BuilderFactory.STRING);
42084213
}
42094214

4215+
@Deprecated
42104216
public final CommandObject<Map<String, Object>> graphConfigGet(String configName) {
42114217
return new CommandObject<>(commandArguments(GraphCommand.CONFIG).add(GraphKeyword.GET).add(configName), BuilderFactory.ENCODED_OBJECT_MAP);
42124218
}

src/main/java/redis/clients/jedis/UnifiedJedis.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4699,76 +4699,91 @@ public List<Double> tdigestByRevRank(String key, long... ranks) {
46994699

47004700
// RedisGraph commands
47014701
@Override
4702+
@Deprecated
47024703
public ResultSet graphQuery(String name, String query) {
47034704
return executeCommand(graphCommandObjects.graphQuery(name, query));
47044705
}
47054706

47064707
@Override
4708+
@Deprecated
47074709
public ResultSet graphReadonlyQuery(String name, String query) {
47084710
return executeCommand(graphCommandObjects.graphReadonlyQuery(name, query));
47094711
}
47104712

47114713
@Override
4714+
@Deprecated
47124715
public ResultSet graphQuery(String name, String query, long timeout) {
47134716
return executeCommand(graphCommandObjects.graphQuery(name, query, timeout));
47144717
}
47154718

47164719
@Override
4720+
@Deprecated
47174721
public ResultSet graphReadonlyQuery(String name, String query, long timeout) {
47184722
return executeCommand(graphCommandObjects.graphReadonlyQuery(name, query, timeout));
47194723
}
47204724

47214725
@Override
4726+
@Deprecated
47224727
public ResultSet graphQuery(String name, String query, Map<String, Object> params) {
47234728
return executeCommand(graphCommandObjects.graphQuery(name, query, params));
47244729
}
47254730

47264731
@Override
4732+
@Deprecated
47274733
public ResultSet graphReadonlyQuery(String name, String query, Map<String, Object> params) {
47284734
return executeCommand(graphCommandObjects.graphReadonlyQuery(name, query, params));
47294735
}
47304736

47314737
@Override
4738+
@Deprecated
47324739
public ResultSet graphQuery(String name, String query, Map<String, Object> params, long timeout) {
47334740
return executeCommand(graphCommandObjects.graphQuery(name, query, params, timeout));
47344741
}
47354742

47364743
@Override
4744+
@Deprecated
47374745
public ResultSet graphReadonlyQuery(String name, String query, Map<String, Object> params, long timeout) {
47384746
return executeCommand(graphCommandObjects.graphReadonlyQuery(name, query, params, timeout));
47394747
}
47404748

47414749
@Override
4750+
@Deprecated
47424751
public String graphDelete(String name) {
47434752
return executeCommand(graphCommandObjects.graphDelete(name));
47444753
}
47454754

47464755
@Override
4756+
@Deprecated
47474757
public List<String> graphList() {
47484758
return executeCommand(commandObjects.graphList());
47494759
}
47504760

47514761
@Override
4762+
@Deprecated
47524763
public List<String> graphProfile(String graphName, String query) {
47534764
return executeCommand(commandObjects.graphProfile(graphName, query));
47544765
}
47554766

47564767
@Override
4768+
@Deprecated
47574769
public List<String> graphExplain(String graphName, String query) {
47584770
return executeCommand(commandObjects.graphExplain(graphName, query));
47594771
}
47604772

47614773
@Override
4774+
@Deprecated
47624775
public List<List<Object>> graphSlowlog(String graphName) {
47634776
return executeCommand(commandObjects.graphSlowlog(graphName));
47644777
}
47654778

47664779
@Override
4780+
@Deprecated
47674781
public String graphConfigSet(String configName, Object value) {
47684782
return executeCommand(commandObjects.graphConfigSet(configName, value));
47694783
}
47704784

47714785
@Override
4786+
@Deprecated
47724787
public Map<String, Object> graphConfigGet(String configName) {
47734788
return executeCommand(commandObjects.graphConfigGet(configName));
47744789
}

src/main/java/redis/clients/jedis/graph/GraphCache.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
/**
44
* Store a local cache in the client, for a specific graph. Holds the labels, property names and
55
* relationship types.
6+
* @deprecated Redis Graph support is deprecated.
67
*/
8+
@Deprecated
79
interface GraphCache {
810

911
/**

src/main/java/redis/clients/jedis/graph/GraphCommandObjects.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
import redis.clients.jedis.graph.GraphProtocol.GraphCommand;
2020
import redis.clients.jedis.providers.ConnectionProvider;
2121

22+
/**
23+
* @deprecated Redis Graph support is deprecated.
24+
*/
25+
@Deprecated
2226
public class GraphCommandObjects {
2327

2428
private final RedisGraphCommands graph;

src/main/java/redis/clients/jedis/graph/GraphProtocol.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
import redis.clients.jedis.commands.ProtocolCommand;
55
import redis.clients.jedis.util.SafeEncoder;
66

7+
@Deprecated
78
public class GraphProtocol {
89

10+
@Deprecated
911
public enum GraphCommand implements ProtocolCommand {
1012

1113
QUERY,
@@ -29,6 +31,7 @@ public byte[] getRaw() {
2931
}
3032
}
3133

34+
@Deprecated
3235
public enum GraphKeyword implements Rawable {
3336

3437
CYPHER,

src/main/java/redis/clients/jedis/graph/GraphQueryParams.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22

33
import java.util.HashMap;
44
import java.util.Map;
5-
import java.util.function.Function;
65

76
import redis.clients.jedis.CommandArguments;
8-
import redis.clients.jedis.commands.ProtocolCommand;
97
import redis.clients.jedis.exceptions.JedisException;
10-
import redis.clients.jedis.graph.GraphProtocol.GraphCommand;
118
import redis.clients.jedis.graph.GraphProtocol.GraphKeyword;
129
import redis.clients.jedis.params.IParams;
1310

11+
/**
12+
* @deprecated Redis Graph support is deprecated.
13+
*/
14+
@Deprecated
1415
public class GraphQueryParams implements IParams {
1516

1617
private boolean readonly;

src/main/java/redis/clients/jedis/graph/Header.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
import java.util.List;
44

55
/**
6-
* Query response header interface. Represents the response schema (column names and types)
6+
* Query response header interface. Represents the response schema (column names and types).
7+
* @deprecated Redis Graph support is deprecated.
78
*/
9+
@Deprecated
810
public interface Header {
911

1012
List<ResultSet.ColumnType> getSchemaTypes();

src/main/java/redis/clients/jedis/graph/Record.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
* Container for RedisGraph result values.
77
*
88
* List records are returned from RedisGraph statement execution, contained within a ResultSet.
9+
*
10+
* @deprecated Redis Graph support is deprecated.
911
*/
12+
@Deprecated
1013
public interface Record {
1114

1215
/**

src/main/java/redis/clients/jedis/graph/RedisGraphCommands.java

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
import java.util.List;
44
import java.util.Map;
55

6+
/**
7+
* @deprecated Redis Graph support is deprecated.
8+
*/
9+
@Deprecated
610
public interface RedisGraphCommands {
711

812
/**
@@ -11,7 +15,9 @@ public interface RedisGraphCommands {
1115
* @param name a graph to perform the query on
1216
* @param query Cypher query
1317
* @return a result set
18+
* @deprecated Redis Graph support is deprecated.
1419
*/
20+
@Deprecated
1521
ResultSet graphQuery(String name, String query);
1622

1723
/**
@@ -20,7 +26,9 @@ public interface RedisGraphCommands {
2026
* @param name a graph to perform the query on
2127
* @param query Cypher query
2228
* @return a result set
29+
* @deprecated Redis Graph support is deprecated.
2330
*/
31+
@Deprecated
2432
ResultSet graphReadonlyQuery(String name, String query);
2533

2634
/**
@@ -30,7 +38,9 @@ public interface RedisGraphCommands {
3038
* @param query Cypher query
3139
* @param timeout
3240
* @return a result set
41+
* @deprecated Redis Graph support is deprecated.
3342
*/
43+
@Deprecated
3444
ResultSet graphQuery(String name, String query, long timeout);
3545

3646
/**
@@ -40,7 +50,9 @@ public interface RedisGraphCommands {
4050
* @param query Cypher query
4151
* @param timeout
4252
* @return a result set
53+
* @deprecated Redis Graph support is deprecated.
4354
*/
55+
@Deprecated
4456
ResultSet graphReadonlyQuery(String name, String query, long timeout);
4557

4658
/**
@@ -50,7 +62,9 @@ public interface RedisGraphCommands {
5062
* @param query Cypher query.
5163
* @param params parameters map.
5264
* @return a result set.
65+
* @deprecated Redis Graph support is deprecated.
5366
*/
67+
@Deprecated
5468
ResultSet graphQuery(String name, String query, Map<String, Object> params);
5569

5670
/**
@@ -60,7 +74,9 @@ public interface RedisGraphCommands {
6074
* @param query Cypher query.
6175
* @param params parameters map.
6276
* @return a result set.
77+
* @deprecated Redis Graph support is deprecated.
6378
*/
79+
@Deprecated
6480
ResultSet graphReadonlyQuery(String name, String query, Map<String, Object> params);
6581

6682
/**
@@ -71,7 +87,9 @@ public interface RedisGraphCommands {
7187
* @param params parameters map.
7288
* @param timeout
7389
* @return a result set.
90+
* @deprecated Redis Graph support is deprecated.
7491
*/
92+
@Deprecated
7593
ResultSet graphQuery(String name, String query, Map<String, Object> params, long timeout);
7694

7795
/**
@@ -82,40 +100,54 @@ public interface RedisGraphCommands {
82100
* @param params parameters map.
83101
* @param timeout
84102
* @return a result set.
103+
* @deprecated Redis Graph support is deprecated.
85104
*/
105+
@Deprecated
86106
ResultSet graphReadonlyQuery(String name, String query, Map<String, Object> params, long timeout);
87107

88108
/**
89109
* Deletes the entire graph
90110
*
91111
* @param name graph to delete
92112
* @return delete running time statistics
113+
* @deprecated Redis Graph support is deprecated.
93114
*/
115+
@Deprecated
94116
String graphDelete(String name);
95117

96118
/**
97119
* Lists all graph keys in the keyspace.
98120
* @return graph keys
121+
* @deprecated Redis Graph support is deprecated.
99122
*/
123+
@Deprecated
100124
List<String> graphList();
101125

102126
/**
103127
* Executes a query and produces an execution plan augmented with metrics for each operation's execution.
128+
* @deprecated Redis Graph support is deprecated.
104129
*/
130+
@Deprecated
105131
List<String> graphProfile(String graphName, String query);
106132

107133
/**
108134
* Constructs a query execution plan but does not run it. Inspect this execution plan to better understand how your
109135
* query will get executed.
136+
* @deprecated Redis Graph support is deprecated.
110137
*/
138+
@Deprecated
111139
List<String> graphExplain(String graphName, String query);
112140

113141
/**
114142
* Returns a list containing up to 10 of the slowest queries issued against the given graph ID.
143+
* @deprecated Redis Graph support is deprecated.
115144
*/
145+
@Deprecated
116146
List<List<Object>> graphSlowlog(String graphName);
117147

148+
@Deprecated
118149
String graphConfigSet(String configName, Object value);
119150

151+
@Deprecated
120152
Map<String, Object> graphConfigGet(String configName);
121153
}

src/main/java/redis/clients/jedis/graph/RedisGraphPipelineCommands.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,39 @@
44
import java.util.Map;
55
import redis.clients.jedis.Response;
66

7+
/**
8+
* @deprecated Redis Graph support is deprecated.
9+
*/
10+
@Deprecated
711
public interface RedisGraphPipelineCommands {
812

13+
@Deprecated
914
Response<ResultSet> graphQuery(String name, String query);
1015

16+
@Deprecated
1117
Response<ResultSet> graphReadonlyQuery(String name, String query);
1218

19+
@Deprecated
1320
Response<ResultSet> graphQuery(String name, String query, long timeout);
1421

22+
@Deprecated
1523
Response<ResultSet> graphReadonlyQuery(String name, String query, long timeout);
1624

25+
@Deprecated
1726
Response<ResultSet> graphQuery(String name, String query, Map<String, Object> params);
1827

28+
@Deprecated
1929
Response<ResultSet> graphReadonlyQuery(String name, String query, Map<String, Object> params);
2030

31+
@Deprecated
2132
Response<ResultSet> graphQuery(String name, String query, Map<String, Object> params, long timeout);
2233

34+
@Deprecated
2335
Response<ResultSet> graphReadonlyQuery(String name, String query, Map<String, Object> params, long timeout);
2436

37+
@Deprecated
2538
Response<String> graphDelete(String name);
2639

40+
@Deprecated
2741
Response<List<String>> graphProfile(String graphName, String query);
2842
}

0 commit comments

Comments
 (0)