[
https://issues.apache.org/jira/browse/FLINK-4361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15464401#comment-15464401
]
ASF GitHub Bot commented on FLINK-4361:
---------------------------------------
GitHub user tillrohrmann opened a pull request:
https://github.com/apache/flink/pull/2472
[FLINK-4361] Introduce Flink's own future abstraction
Flink's future abstraction whose API is similar to Java 8's
CompletableFuture.
That's in order to ease a future transition to this class once we ditch
Java 7.
The current set of operations comprises:
- isDone to check the completion of the future
- get/getNow to obtain the future's value
- cancel to cancel the future (best effort basis)
- thenApplyAsync to transform the future's value into another value
- thenAcceptAsync to register a callback for a successful completion of the
future
- exceptionallyAsync to register a callback for an exception completion of
the future
- thenComposeAsync to transform the future's value and flatten the returned
future
- handleAsync to register a callback which is called either with the
regular result
or the exceptional result
Additionally, Flink offers a CompletableFuture which can be completed with
a regular
value or an exception:
- complete/completeExceptionally
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/tillrohrmann/flink futures
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/2472.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2472
----
commit 14023bb0df8e1a263d4082fb0e747a831e82f4cd
Author: Till Rohrmann <[email protected]>
Date: 2016-09-02T19:13:34Z
[FLINK-4361] Introduce Flink's own future abstraction
Flink's future abstraction whose API is similar to Java 8's
CompletableFuture.
That's in order to ease a future transition to this class once we ditch
Java 7.
The current set of operations comprises:
- isDone to check the completion of the future
- get/getNow to obtain the future's value
- cancel to cancel the future (best effort basis)
- thenApplyAsync to transform the future's value into another value
- thenAcceptAsync to register a callback for a successful completion of the
future
- exceptionallyAsync to register a callback for an exception completion of
the future
- thenComposeAsync to transform the future's value and flatten the returned
future
- handleAsync to register a callback which is called either with the
regular result
or the exceptional result
Additionally, Flink offers a CompletableFuture which can be completed with
a regular
value or an exception:
- complete/completeExceptionally
----
> Introduce Flink's own future abstraction
> ----------------------------------------
>
> Key: FLINK-4361
> URL: https://issues.apache.org/jira/browse/FLINK-4361
> Project: Flink
> Issue Type: Sub-task
> Components: Distributed Coordination
> Reporter: Stephan Ewen
> Assignee: Till Rohrmann
>
> In order to keep the abstraction Scala Independent, we should not rely on
> Scala Futures
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)