-
Notifications
You must be signed in to change notification settings - Fork 157
Simplification streamable commands #684
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
Simplification streamable commands #684
Conversation
18ea4cb to
c8d6ece
Compare
f1406c3 to
9630a11
Compare
| return future; | ||
| } | ||
|
|
||
| @SuppressWarnings("unchecked") |
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.
Most of these changes look good (and needed).
The only thing that stands out are these two unchecked suppressions. We're ignoring the type system here, which always feels bad for some reason. Could we make these abstract methods, and then provide subclasses where I == CoreI and/or R == CoreR, and use those where necessary?
Sort of like what I did with the ImmediateCoreFutureAdapter: https://github.com/basho/riak-java-client/pull/677/files#diff-1c6f3b6c65d8e0eeaee247ff938a349bR70 ?
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 hate usage of whatever suppression, therefore it took some time from me to make a decision. The idea was to avoid the necessity of creating additional object such as ImmediateCoreFutureAdapter.SameQueryInfo and use Method References whenever it is possible. And also to reduce complexity I've added these default implementation that covers default scenario that doesn't require response/info conversion.
But later I realized that it might have sense to introduce another class to handle this specific case and GenericRiakComand should extend it.
7b072ca to
52795d4
Compare
42029ea to
d97183a
Compare
|
+1 |
Please ensure the following is present in your PR:
Pull requests that are small and limited in scope are most welcome.