diff --git a/src/main/java/redis/clients/jedis/CommandObjects.java b/src/main/java/redis/clients/jedis/CommandObjects.java index 89eb3e16ca..5a66f803a8 100644 --- a/src/main/java/redis/clients/jedis/CommandObjects.java +++ b/src/main/java/redis/clients/jedis/CommandObjects.java @@ -4414,26 +4414,31 @@ public final CommandObject> graphConfigGet(String configName // RedisGraph commands // RedisGears commands + @Deprecated public final CommandObject tFunctionLoad(String libraryCode, TFunctionLoadParams params) { return new CommandObject<>(commandArguments(GearsCommand.TFUNCTION).add(GearsKeyword.LOAD) .addParams(params).add(libraryCode), BuilderFactory.STRING); } + @Deprecated public final CommandObject tFunctionDelete(String libraryName) { return new CommandObject<>(commandArguments(GearsCommand.TFUNCTION).add(GearsKeyword.DELETE) .add(libraryName), BuilderFactory.STRING); } + @Deprecated public final CommandObject> tFunctionList(TFunctionListParams params) { return new CommandObject<>(commandArguments(GearsCommand.TFUNCTION).add(GearsKeyword.LIST) .addParams(params), GearsLibraryInfo.GEARS_LIBRARY_INFO_LIST); } + @Deprecated public final CommandObject tFunctionCall(String library, String function, List keys, List 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 tFunctionCallAsync(String library, String function, List keys, List args) { return new CommandObject<>(commandArguments(GearsCommand.TFCALLASYNC).add(library + "." + function) .add(keys.size()).keys(keys).addObjects(args), BuilderFactory.AGGRESSIVE_ENCODED_OBJECT); diff --git a/src/main/java/redis/clients/jedis/UnifiedJedis.java b/src/main/java/redis/clients/jedis/UnifiedJedis.java index e3bc4aba50..50d18351d7 100644 --- a/src/main/java/redis/clients/jedis/UnifiedJedis.java +++ b/src/main/java/redis/clients/jedis/UnifiedJedis.java @@ -4984,26 +4984,31 @@ public Map 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 tFunctionList(TFunctionListParams params) { return executeCommand(commandObjects.tFunctionList(params)); } + @Deprecated @Override public Object tFunctionCall(String library, String function, List keys, List args) { return executeCommand(commandObjects.tFunctionCall(library, function, keys, args)); } + @Deprecated @Override public Object tFunctionCallAsync(String library, String function, List keys, List args) { return executeCommand(commandObjects.tFunctionCallAsync(library, function, keys, args)); diff --git a/src/main/java/redis/clients/jedis/gears/RedisGearsCommands.java b/src/main/java/redis/clients/jedis/gears/RedisGearsCommands.java index f5adb42c9e..e196835ab0 100644 --- a/src/main/java/redis/clients/jedis/gears/RedisGearsCommands.java +++ b/src/main/java/redis/clients/jedis/gears/RedisGearsCommands.java @@ -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 tFunctionList() { + @Deprecated default List tFunctionList() { return tFunctionList(TFunctionListParams.listParams()); } - List tFunctionList(TFunctionListParams params); + @Deprecated List tFunctionList(TFunctionListParams params); - String tFunctionDelete(String libraryName); + @Deprecated String tFunctionDelete(String libraryName); - Object tFunctionCall(String library, String function, List keys, List args); + @Deprecated Object tFunctionCall(String library, String function, List keys, List args); - Object tFunctionCallAsync(String library, String function, List keys, List args); + @Deprecated Object tFunctionCallAsync(String library, String function, List keys, List args); } diff --git a/src/main/java/redis/clients/jedis/gears/RedisGearsProtocol.java b/src/main/java/redis/clients/jedis/gears/RedisGearsProtocol.java index fc43f29e66..dfb73b04a9 100644 --- a/src/main/java/redis/clients/jedis/gears/RedisGearsProtocol.java +++ b/src/main/java/redis/clients/jedis/gears/RedisGearsProtocol.java @@ -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; @@ -24,6 +26,7 @@ public byte[] getRaw() { } } + @Deprecated public enum GearsKeyword implements Rawable { CONFIG, diff --git a/src/main/java/redis/clients/jedis/gears/TFunctionListParams.java b/src/main/java/redis/clients/jedis/gears/TFunctionListParams.java index d3f867e92b..e32bb43639 100644 --- a/src/main/java/redis/clients/jedis/gears/TFunctionListParams.java +++ b/src/main/java/redis/clients/jedis/gears/TFunctionListParams.java @@ -6,6 +6,7 @@ import java.util.Collections; +@Deprecated public class TFunctionListParams implements IParams { private boolean withCode = false; private int verbose; diff --git a/src/main/java/redis/clients/jedis/gears/TFunctionLoadParams.java b/src/main/java/redis/clients/jedis/gears/TFunctionLoadParams.java index d155727ec5..b8b0363b6e 100644 --- a/src/main/java/redis/clients/jedis/gears/TFunctionLoadParams.java +++ b/src/main/java/redis/clients/jedis/gears/TFunctionLoadParams.java @@ -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; diff --git a/src/main/java/redis/clients/jedis/gears/resps/FunctionInfo.java b/src/main/java/redis/clients/jedis/gears/resps/FunctionInfo.java index ccb8785812..24d47b0e4e 100644 --- a/src/main/java/redis/clients/jedis/gears/resps/FunctionInfo.java +++ b/src/main/java/redis/clients/jedis/gears/resps/FunctionInfo.java @@ -10,6 +10,7 @@ import static redis.clients.jedis.BuilderFactory.*; +@Deprecated public class FunctionInfo { private final String name; private final String description; @@ -40,6 +41,7 @@ public FunctionInfo(String name, String description, boolean isAsync, List> FUNCTION_INFO_LIST = new Builder>() { @Override public List build(Object data) { diff --git a/src/main/java/redis/clients/jedis/gears/resps/FunctionStreamInfo.java b/src/main/java/redis/clients/jedis/gears/resps/FunctionStreamInfo.java index f4b607d6a3..577a0992fc 100644 --- a/src/main/java/redis/clients/jedis/gears/resps/FunctionStreamInfo.java +++ b/src/main/java/redis/clients/jedis/gears/resps/FunctionStreamInfo.java @@ -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; @@ -67,6 +68,7 @@ public FunctionStreamInfo(String name, String idToReadFrom, String lastError, this.pendingIds = pendingIds; } + @Deprecated public static final Builder> STREAM_INFO_LIST = new Builder>() { @Override public List build(Object data) { diff --git a/src/main/java/redis/clients/jedis/gears/resps/GearsLibraryInfo.java b/src/main/java/redis/clients/jedis/gears/resps/GearsLibraryInfo.java index 5ed6515ff6..d16a607cd2 100644 --- a/src/main/java/redis/clients/jedis/gears/resps/GearsLibraryInfo.java +++ b/src/main/java/redis/clients/jedis/gears/resps/GearsLibraryInfo.java @@ -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 clusterFunctions; @@ -90,6 +91,7 @@ public String getUser() { return user; } + @Deprecated public static final Builder GEARS_LIBRARY_INFO = new Builder() { @Override public GearsLibraryInfo build(Object data) { @@ -171,6 +173,7 @@ public GearsLibraryInfo build(Object data) { } }; + @Deprecated public static final Builder> GEARS_LIBRARY_INFO_LIST = new Builder>() { @Override public List build(Object data) { diff --git a/src/main/java/redis/clients/jedis/gears/resps/StreamTriggerInfo.java b/src/main/java/redis/clients/jedis/gears/resps/StreamTriggerInfo.java index be526e0e71..202d4bba4f 100644 --- a/src/main/java/redis/clients/jedis/gears/resps/StreamTriggerInfo.java +++ b/src/main/java/redis/clients/jedis/gears/resps/StreamTriggerInfo.java @@ -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; @@ -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> STREAM_TRIGGER_INFO_LIST = new Builder>() { @Override public List build(Object data) { diff --git a/src/main/java/redis/clients/jedis/gears/resps/TriggerInfo.java b/src/main/java/redis/clients/jedis/gears/resps/TriggerInfo.java index 8a5b470484..775af5cecd 100644 --- a/src/main/java/redis/clients/jedis/gears/resps/TriggerInfo.java +++ b/src/main/java/redis/clients/jedis/gears/resps/TriggerInfo.java @@ -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; @@ -80,6 +81,7 @@ public TriggerInfo(String name, String description, String lastError, long numFi this.totalExecutionTime = totalExecutionTime; } + @Deprecated public static final Builder> KEYSPACE_TRIGGER_INFO_LIST = new Builder>() { @Override public List build(Object data) { diff --git a/src/test/java/redis/clients/jedis/commands/commandobjects/CommandObjectsTriggersAndFunctionsCommandsTest.java b/src/test/java/redis/clients/jedis/commands/commandobjects/CommandObjectsTriggersAndFunctionsCommandsTest.java index 6403f57404..ce198f4627 100644 --- a/src/test/java/redis/clients/jedis/commands/commandobjects/CommandObjectsTriggersAndFunctionsCommandsTest.java +++ b/src/test/java/redis/clients/jedis/commands/commandobjects/CommandObjectsTriggersAndFunctionsCommandsTest.java @@ -8,6 +8,7 @@ import java.util.ArrayList; import java.util.List; import org.junit.After; +import org.junit.Ignore; import org.junit.Test; import redis.clients.jedis.RedisProtocol; @@ -19,6 +20,7 @@ /** * Tests related to Triggers and functions commands. */ +@Ignore public class CommandObjectsTriggersAndFunctionsCommandsTest extends CommandObjectsModulesTestBase { public CommandObjectsTriggersAndFunctionsCommandsTest(RedisProtocol protocol) { diff --git a/src/test/java/redis/clients/jedis/mocked/unified/UnifiedJedisTriggersAndFunctionsCommandsTest.java b/src/test/java/redis/clients/jedis/mocked/unified/UnifiedJedisTriggersAndFunctionsCommandsTest.java index 5dec794c65..62fd7bf7cd 100644 --- a/src/test/java/redis/clients/jedis/mocked/unified/UnifiedJedisTriggersAndFunctionsCommandsTest.java +++ b/src/test/java/redis/clients/jedis/mocked/unified/UnifiedJedisTriggersAndFunctionsCommandsTest.java @@ -9,12 +9,13 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; - +import org.junit.Ignore; import org.junit.Test; import redis.clients.jedis.gears.TFunctionListParams; import redis.clients.jedis.gears.TFunctionLoadParams; import redis.clients.jedis.gears.resps.GearsLibraryInfo; +@Ignore public class UnifiedJedisTriggersAndFunctionsCommandsTest extends UnifiedJedisMockedTestBase { @Test diff --git a/src/test/java/redis/clients/jedis/modules/gears/GearsTest.java b/src/test/java/redis/clients/jedis/modules/gears/GearsTest.java index 117094b9b8..e32e526279 100644 --- a/src/test/java/redis/clients/jedis/modules/gears/GearsTest.java +++ b/src/test/java/redis/clients/jedis/modules/gears/GearsTest.java @@ -1,9 +1,19 @@ package redis.clients.jedis.modules.gears; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.*; +import java.util.function.Predicate; +import java.util.stream.Collectors; +import java.util.stream.Stream; + import org.hamcrest.Matchers; import org.junit.After; import org.junit.Assert; import org.junit.BeforeClass; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; @@ -15,15 +25,6 @@ import redis.clients.jedis.modules.RedisModuleCommandsTestBase; import redis.clients.jedis.gears.resps.GearsLibraryInfo; -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.*; -import java.util.function.Predicate; -import java.util.stream.Collectors; -import java.util.stream.Stream; - import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -31,6 +32,7 @@ import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; +@Ignore @RunWith(Parameterized.class) public class GearsTest extends RedisModuleCommandsTestBase {