Upgrade Jedis from version 3 to 5 #3947
-
Hi all! I'm sorry if the answers are obvious, just I don't which would be the preferred way. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 14 replies
-
@tamasgyenese Thank you for using Jedis. It has been close to 3 years Jedis 4.0.0 has been released. Almost none of the people that were involved in Jedis are now with us. We know what we have but it is now difficult to go through all the reasoning. Still, to mention something:
For rest of the questions, I would suggest you to provide code examples for 3.x so we may be help to update those. |
Beta Was this translation helpful? Give feedback.
-
@sazzad16 thank you! public class MyClass<T> extends JedisClusterCommand<T> {
private final Function<WrapperClass, T> function;
public MyClass(JedisClusterConnectionHandler connectionHandler, Function<WrapperClass, T> command, int maxAttempts) {
super(connectionHandler, maxAttempts, Duration.ofMillis(30));
function = command;
}
@Override
public T execute(Jedis jedis) {
return function.apply(new WrapperClass(jedis));
}
} and calling it: return new MyClass<T>(connectionHandler, command, 4).run(key); I've checked the CommandExecutor classes, like ClusterCommandExecutor, but the methods are |
Beta Was this translation helpful? Give feedback.
@tamasgyenese Thank you for using Jedis.
It has been close to 3 years Jedis 4.0.0 has been released. Almost none of the people that were involved in Jedis are now with us. We know what we have but it is now difficult to go through all the reasoning.
Still, to mention something:
For rest of the questions, I would suggest you to provide code examples for 3.x so we may be help to update those.