-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Allow Jedis to be selected when both Jedis and Lettuce are on the classpath #22569
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
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.
Thanks for the PR. I've added a suggestion.
/** | ||
* Client type to use - 'jedis' or 'lettuce'. | ||
*/ | ||
private String clientType; |
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.
I'd use an enum with Jedis
and Lettuce
here rather than a raw string. This also improves the developer experience in the IDE.
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.
I will wait to see what shakes out of #22559 (comment) before updating.
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.
Thanks @Bono007. We've decided to go ahead with the property so if you have time to update your proposal to use an enum that would be much appreciated.
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.
Sounds good @snicoll. The property approach will be cleaner than the "move the auto-configs to the connection configs" I was proposing as that ended up being a bit messier than I originally thought when I prototyped it.
I will get to it this evening.
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.
Done. I squashed and rebased as well.
public enum ClientType { | ||
|
||
/** | ||
* Use the Lettuce client |
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.
Not super thrilled about this comment - please update if you have a preference.
@snicoll good catch on the default. Thx. |
Adds ability to choose Redis client when both Lettuce and Jedis on classpath.
Fixes gh-22559