Skip to content
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

opinion on refactoring ListenableFuture to Java 8 CompletableFuture #50

Closed
wants to merge 1 commit into from

Conversation

yulin2
Copy link

@yulin2 yulin2 commented Dec 31, 2014

I'm doing research on new concurrent constructs in Java 8. I found CompletableFuture in Java 8 has the same functionality as Guava ListenableFuture. But CompletableFuture is much nicer because it comes together with Lambda expression in Java 8, and it is monadic, which makes the code more readable and cleaner. Also, it provides more ways to compose different tasks. Therefore, using CompletableFuture instead of ListenableFuture is better for future extension and maintenance of the code.

I tried to refactoring one Guava ListenableFuture to Java 8 CompletableFuture in Cassandra, so you can see the difference in the code. You don't have to merge this pull request. I'm just wondering your opinion on this kind of refactoring (or migrating the code from Java 7 to Java 8). Do you think the refactoring is useful? Do you have any plan to use Java 8?

@markreddy
Copy link

@yulin2 Pull requests are not used for Apache Cassandra. Please open a JIRA (https://issues.apache.org/jira/browse/CASSANDRA) if you have an improvement, idea or issue to share and close this request.

@yulin2 yulin2 closed this Jan 5, 2015
bdeggleston pushed a commit to bdeggleston/cassandra that referenced this pull request Dec 11, 2023
Permit the state machine to erase transactions that are known to be applied across the cluster.

---------

Co-authored-by: dcapwell <dcapwell@gmail.com>
Co-authored-by: Aleksey Yeschenko <aleksey@apache.org>
Co-authored-by: Ariel Weisberg <aweisberg@apple.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants