-
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
Added Rawable interface #2370
Added Rawable interface #2370
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.
Do you have a future use of this in mind?
Yeah. Will do it later. |
A recent example is #2424, where |
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.
Looks good. Do we have a better naming option than Raw
for the interface? 😃
@dengliming There are many other options.
Is any of these better? I'm not sure. 😆 |
Not sure. but I prefer |
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.
Raw
and ProtocolKeyword
are both good to me. : )
I like |
@dengliming What are your preferences now? (including Rawable) |
+1 : ) |
Jedis should have a common interface to represent all commands and keywords (and, perhaps, arguments). Closest thing we currently have is
ProtocolCommand
interface. But the problem is that it contains the word COMMAND which would be misleading to use for something other than commands.One option is to rename the existing interface. But this would be a breaking change and so it can't be available before at least Jedis 4.0. Even that can be received negatively by the users who could be using the existing interface.
Having a parent interface, on the other hand, does not have such issues and can be included in upcoming non-major release.
I went with name
Raw
, instead of other names likeProtocolKeyword
orProtocolArgument
, because it is short and fits nicely with our go to methodgetRaw()
.I have also put it in a separate package because with growing number of classes, we'd be able to put some classes in that package.