Skip to content

Commit

Permalink
Merge branch 'master' into 5.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
uglide authored Sep 27, 2024
2 parents da236cf + 251831c commit fcde2ff
Show file tree
Hide file tree
Showing 19 changed files with 1,672 additions and 20 deletions.
5 changes: 5 additions & 0 deletions src/main/java/redis/clients/jedis/CommandObjects.java
Original file line number Diff line number Diff line change
Expand Up @@ -4414,26 +4414,31 @@ public final CommandObject<Map<String, Object>> graphConfigGet(String configName
// RedisGraph commands

// RedisGears commands
@Deprecated
public final CommandObject<String> tFunctionLoad(String libraryCode, TFunctionLoadParams params) {
return new CommandObject<>(commandArguments(GearsCommand.TFUNCTION).add(GearsKeyword.LOAD)
.addParams(params).add(libraryCode), BuilderFactory.STRING);
}

@Deprecated
public final CommandObject<String> tFunctionDelete(String libraryName) {
return new CommandObject<>(commandArguments(GearsCommand.TFUNCTION).add(GearsKeyword.DELETE)
.add(libraryName), BuilderFactory.STRING);
}

@Deprecated
public final CommandObject<List<GearsLibraryInfo>> tFunctionList(TFunctionListParams params) {
return new CommandObject<>(commandArguments(GearsCommand.TFUNCTION).add(GearsKeyword.LIST)
.addParams(params), GearsLibraryInfo.GEARS_LIBRARY_INFO_LIST);
}

@Deprecated
public final CommandObject<Object> tFunctionCall(String library, String function, List<String> keys, List<String> args) {
return new CommandObject<>(commandArguments(GearsCommand.TFCALL).add(library + "." + function)
.add(keys.size()).keys(keys).addObjects(args), BuilderFactory.AGGRESSIVE_ENCODED_OBJECT);
}

@Deprecated
public final CommandObject<Object> tFunctionCallAsync(String library, String function, List<String> keys, List<String> args) {
return new CommandObject<>(commandArguments(GearsCommand.TFCALLASYNC).add(library + "." + function)
.add(keys.size()).keys(keys).addObjects(args), BuilderFactory.AGGRESSIVE_ENCODED_OBJECT);
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/redis/clients/jedis/UnifiedJedis.java
Original file line number Diff line number Diff line change
Expand Up @@ -5042,26 +5042,31 @@ public Map<String, Object> graphConfigGet(String configName) {
// RedisGraph commands

// RedisGears commands
@Deprecated
@Override
public String tFunctionLoad(String libraryCode, TFunctionLoadParams params) {
return executeCommand(commandObjects.tFunctionLoad(libraryCode, params));
}

@Deprecated
@Override
public String tFunctionDelete(String libraryName) {
return executeCommand(commandObjects.tFunctionDelete(libraryName));
}

@Deprecated
@Override
public List<GearsLibraryInfo> tFunctionList(TFunctionListParams params) {
return executeCommand(commandObjects.tFunctionList(params));
}

@Deprecated
@Override
public Object tFunctionCall(String library, String function, List<String> keys, List<String> args) {
return executeCommand(commandObjects.tFunctionCall(library, function, keys, args));
}

@Deprecated
@Override
public Object tFunctionCallAsync(String library, String function, List<String> keys, List<String> args) {
return executeCommand(commandObjects.tFunctionCallAsync(library, function, keys, args));
Expand Down
15 changes: 8 additions & 7 deletions src/main/java/redis/clients/jedis/gears/RedisGearsCommands.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,24 @@

import java.util.List;

@Deprecated
public interface RedisGearsCommands {

default String tFunctionLoad(String libraryCode) {
@Deprecated default String tFunctionLoad(String libraryCode) {
return tFunctionLoad(libraryCode, TFunctionLoadParams.loadParams());
}

String tFunctionLoad(String libraryCode, TFunctionLoadParams params);
@Deprecated String tFunctionLoad(String libraryCode, TFunctionLoadParams params);

default List<GearsLibraryInfo> tFunctionList() {
@Deprecated default List<GearsLibraryInfo> tFunctionList() {
return tFunctionList(TFunctionListParams.listParams());
}

List<GearsLibraryInfo> tFunctionList(TFunctionListParams params);
@Deprecated List<GearsLibraryInfo> tFunctionList(TFunctionListParams params);

String tFunctionDelete(String libraryName);
@Deprecated String tFunctionDelete(String libraryName);

Object tFunctionCall(String library, String function, List<String> keys, List<String> args);
@Deprecated Object tFunctionCall(String library, String function, List<String> keys, List<String> args);

Object tFunctionCallAsync(String library, String function, List<String> keys, List<String> args);
@Deprecated Object tFunctionCallAsync(String library, String function, List<String> keys, List<String> args);
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
import redis.clients.jedis.commands.ProtocolCommand;
import redis.clients.jedis.util.SafeEncoder;

@Deprecated
public class RedisGearsProtocol {

@Deprecated
public enum GearsCommand implements ProtocolCommand {

TFUNCTION,
TFCALL,
TFCALLASYNC;
@Deprecated TFUNCTION,
@Deprecated TFCALL,
@Deprecated TFCALLASYNC;

private final byte[] raw;

Expand All @@ -24,6 +26,7 @@ public byte[] getRaw() {
}
}

@Deprecated
public enum GearsKeyword implements Rawable {

CONFIG,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import java.util.Collections;

@Deprecated
public class TFunctionListParams implements IParams {
private boolean withCode = false;
private int verbose;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import redis.clients.jedis.gears.RedisGearsProtocol.GearsKeyword;
import redis.clients.jedis.params.IParams;

@Deprecated
public class TFunctionLoadParams implements IParams {
private boolean replace = false;
private String config;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import static redis.clients.jedis.BuilderFactory.*;

@Deprecated
public class FunctionInfo {
private final String name;
private final String description;
Expand Down Expand Up @@ -40,6 +41,7 @@ public FunctionInfo(String name, String description, boolean isAsync, List<Strin
this.flags = flags;
}

@Deprecated
public static final Builder<List<FunctionInfo>> FUNCTION_INFO_LIST = new Builder<List<FunctionInfo>>() {
@Override
public List<FunctionInfo> build(Object data) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import java.util.List;
import java.util.stream.Collectors;

@Deprecated
public class FunctionStreamInfo {
private final String name;
private final String idToReadFrom;
Expand Down Expand Up @@ -67,6 +68,7 @@ public FunctionStreamInfo(String name, String idToReadFrom, String lastError,
this.pendingIds = pendingIds;
}

@Deprecated
public static final Builder<List<FunctionStreamInfo>> STREAM_INFO_LIST = new Builder<List<FunctionStreamInfo>>() {
@Override
public List<FunctionStreamInfo> build(Object data) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import static redis.clients.jedis.gears.resps.StreamTriggerInfo.STREAM_TRIGGER_INFO_LIST;
import static redis.clients.jedis.gears.resps.TriggerInfo.KEYSPACE_TRIGGER_INFO_LIST;

@Deprecated
public class GearsLibraryInfo {
private final String apiVersion;
private final List<String> clusterFunctions;
Expand Down Expand Up @@ -90,6 +91,7 @@ public String getUser() {
return user;
}

@Deprecated
public static final Builder<GearsLibraryInfo> GEARS_LIBRARY_INFO = new Builder<GearsLibraryInfo>() {
@Override
public GearsLibraryInfo build(Object data) {
Expand Down Expand Up @@ -171,6 +173,7 @@ public GearsLibraryInfo build(Object data) {
}
};

@Deprecated
public static final Builder<List<GearsLibraryInfo>> GEARS_LIBRARY_INFO_LIST = new Builder<List<GearsLibraryInfo>>() {
@Override
public List<GearsLibraryInfo> build(Object data) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import static redis.clients.jedis.BuilderFactory.*;
import static redis.clients.jedis.gears.resps.FunctionStreamInfo.STREAM_INFO_LIST;

@Deprecated
public class StreamTriggerInfo {
private final String name;
private final String description;
Expand Down Expand Up @@ -60,6 +61,7 @@ public StreamTriggerInfo(String name, String description, String prefix,
this(name, description, prefix, window, trim, Collections.emptyList());
}

@Deprecated
public static final Builder<List<StreamTriggerInfo>> STREAM_TRIGGER_INFO_LIST = new Builder<List<StreamTriggerInfo>>() {
@Override
public List<StreamTriggerInfo> build(Object data) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import static redis.clients.jedis.BuilderFactory.LONG;
import static redis.clients.jedis.BuilderFactory.STRING;

@Deprecated
public class TriggerInfo {
private final String name;
private final String description;
Expand Down Expand Up @@ -80,6 +81,7 @@ public TriggerInfo(String name, String description, String lastError, long numFi
this.totalExecutionTime = totalExecutionTime;
}

@Deprecated
public static final Builder<List<TriggerInfo>> KEYSPACE_TRIGGER_INFO_LIST = new Builder<List<TriggerInfo>>() {
@Override
public List<TriggerInfo> build(Object data) {
Expand Down
Loading

0 comments on commit fcde2ff

Please sign in to comment.