[jira] [Created] (FLINK-12826) Unify FunctionInterfacesWithException implementations

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (FLINK-12826) Unify FunctionInterfacesWithException implementations

Shang Yuanchun (Jira)
TisonKun created FLINK-12826:
--------------------------------

             Summary: Unify FunctionInterfacesWithException implementations
                 Key: FLINK-12826
                 URL: https://issues.apache.org/jira/browse/FLINK-12826
             Project: Flink
          Issue Type: Improvement
    Affects Versions: 1.9.0
            Reporter: TisonKun
            Assignee: TisonKun
             Fix For: 1.9.0


An elegant FunctionInterfacesWithException is like {{BiConsumerWithException}}, which contains

1. Functional method, e.g., {{#accept}}
2. Unchecked adapter static method.

Current {{org.apache.flink.util.function}} use 3 strategies to implement point 2.

1). As above
2). Use another class, e.g., {{CheckedSupplier}}. This is quite tricky because we have both {{ThrowingSupplier}} and {{CheckedSupplier}} and the latter is no more than a static factory wrapper...
3). {{FunctionUtils#uncheckedXXX}} Yet another approach.

I propose to unify these 3 ways into the first way, especially giving {{ThrowingSupplier}} and some others are marked as {{Public}}.

cc [~GJL] [~StephanEwen]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)