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

Allow CompletableFuture creation via ListenableFuture [SPR-15696] #20255

Closed
spring-issuemaster opened this issue Jun 23, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@spring-issuemaster
Copy link
Collaborator

commented Jun 23, 2017

Mark Paluch opened SPR-15696 and commented

Overview

Right now, adoption from ListenableFuture to CompletableFuture is quite cumbersome as it requires callback registrations for success and failure results. To ease adoption it would be great if ListenableFuture could provide a default toCompletableFuture method.

Motivation

Spring Data for Apache Cassandra and Spring Kafka statically declare ListenableFuture on their user-facing APIs. Spring Framework 5 and Spring Data for Apache Cassandra 2 are both based on Java 8 so adding a convenience method improves dev experience and require less boilerplate code within user code.


Affects: 5.0 RC2

Referenced from: commits 87430f3

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Jun 26, 2017

Juergen Hoeller commented

I've added a corresponding completable() method on ListenableFuture, with a default implementation on the interface and specialized implementations on several interfaces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.