-
Notifications
You must be signed in to change notification settings - Fork 1.2k
DATAREDIS-698 - Add support for HSTRLEN. #283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
We now support HSTRLEN command throughout RedisHashCommand for Lettuce and Jedis in both an imperative and reactive manner. However, Jedis not natively supporting HSTRLEN via its API we’ve come up with some more reflective invocation allowing to execute commands currently not known by Jedis. We also added this behavior to the cluster implementation which as of now also supports RedisClusterConnection#execute.
Eagerly initialize known commands. Preallocate Jedis response builder. Replace list concatenation with array copy. Reject null arguments in execute() Remove inversion through collections with direct byte array creation. Reorder signatures, visibility modifiers, Javadoc.
ba3ff9f
to
be3d937
Compare
We now support HSTRLEN command throug RedisHashCommands for Lettuce and Jedis in both an imperative and reactive manner. However, Jedis not natively supporting HSTRLEN via its API we’ve come up with some more reflective invocation allowing to execute commands currently not known by Jedis. We also added this behavior to the cluster implementation which as of now also supports RedisClusterConnection#execute. Original pull request: #283.
Eagerly initialize known commands. Preallocate Jedis response builder. Replace list concatenation with array copy. Reject null arguments in execute(). Remove inversion through collections with direct byte array creation. Reorder arguments in signatures, visibility modifiers, Javadoc. Original pull request: #283.
That's merged now. |
Assert.notNull(args, "Args must not be null!"); | ||
|
||
return clusterCommandExecutor | ||
.executeCommandOnArbitraryNode((JedisClusterCommandCallback<Object>) client -> JedisClientUtils.execute(command, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello! @christophstrobl
I have a question. Why you have chosen executeCommandOnArbitraryNode
?
What If someone decided to use this API to run another command like:
connection.execute("FLUSHDB", "ASYNC".getBytes("UTF-8"));
Don't you think that in this case execution behaviour would be different?
We now support
HSTRLEN
command throughoutRedisHashCommand
for Lettuce and Jedis in both an imperative and reactive (Lettuce only) manner.However as Jedis does not natively support
HSTRLEN
via its API we’ve come up with some more reflective invocation allowing to execute commands currently not known by Jedis. We also added this behavior to the cluster implementation which as of now also supportsRedisClusterConnection#execute
.