-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Support INFO command in UnifiedJedis #4078
base: master
Are you sure you want to change the base?
Conversation
|
||
private static final Object DUMMY_OBJECT = new Object(); | ||
|
||
private final Map<Object, Object> replies; |
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.
Why not Map<HostAndPort, Object> replies;
or NodeID?
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.
Because we don't a specified solution for this, e.g. in ConnectionProvider and CommandExecutor interfaces, yet. For example, in ConnectionProvider interface the respective method definition is Map<?, ?> getConnectionMap()
.
@@ -353,6 +358,16 @@ public String configSet(String parameter, String value) { | |||
return checkAndBroadcastCommand(commandObjects.configSet(parameter, value)); | |||
} | |||
|
|||
public final JedisBroadcastReplies info() { |
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.
It will be a bit strange API when connecting to standalone Redis using let's say UnifiedJedis.
Then you will get a JedisBroadcastReplies
which makes sense for the cluster.
But in case of standalone, you will get JedisBroadcastReplies
, and to get to actual value need to invoke JedisBroadcastReplies::getReplies(with host/port)
or end up with something like
infoReplies.getReplies().values().stream().findFirst().get()
just to get the value
No description provided.