Skip to content

[improve][common] Use Collection instead of List for FutureUtil. - #15329

Merged
RobertIndie merged 1 commit into
apache:masterfrom
mattisonchao:improve_future_util
Apr 26, 2022
Merged

[improve][common] Use Collection instead of List for FutureUtil.#15329
RobertIndie merged 1 commit into
apache:masterfrom
mattisonchao:improve_future_util

Conversation

@mattisonchao

@mattisonchao mattisonchao commented Apr 26, 2022

Copy link
Copy Markdown
Member

Motivation

We can use Collection instead of List parameter type in FutureUtil for better compatibility.
For example when we need to use the values of Map:

FutureUtil.waitForAll(map.values());

Modifications

  • Use Collection instead of List parameter type.

Verifying this change

  • Make sure that the change passes the CI checks.

Documentation

  • no-need-doc

  • doc-not-needed

@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label Apr 26, 2022
@Technoboy- Technoboy- changed the title [improve][common] Use Collection instead of List parameter type. [improve][common] Use Collection instead of List for FutureUtil. Apr 26, 2022
@mattisonchao

Copy link
Copy Markdown
Member Author

/pulsarbot rerun-failure-checks

@Technoboy- Technoboy- added this to the 2.11.0 milestone Apr 26, 2022
@Technoboy-
Technoboy- requested a review from Jason918 April 26, 2022 12:25
@RobertIndie RobertIndie added the type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages label Apr 26, 2022
@RobertIndie
RobertIndie merged commit 0c694cf into apache:master Apr 26, 2022
codelipenghui pushed a commit that referenced this pull request May 20, 2022
#15329)

### Motivation

We can use `Collection` instead of `List` parameter type in `FutureUtil` for better compatibility.
For example when we need to use the values of `Map`:

```java
FutureUtil.waitForAll(map.values());
```
### Modifications

- Use `Collection` instead of `List` parameter type.

(cherry picked from commit 0c694cf)
nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request May 23, 2022
apache#15329)

### Motivation

We can use `Collection` instead of `List` parameter type in `FutureUtil` for better compatibility.
For example when we need to use the values of `Map`:

```java
FutureUtil.waitForAll(map.values());
```
### Modifications

- Use `Collection` instead of `List` parameter type.

(cherry picked from commit 0c694cf)
(cherry picked from commit 08219ae)
nicoloboschi added a commit to datastax/pulsar that referenced this pull request May 26, 2022
@mattisonchao mattisonchao added release/2.9.4 cherry-picked/branch-2.9 Archived: 2.9 is end of life labels Jul 2, 2022
mattisonchao added a commit that referenced this pull request Jul 2, 2022
#15329)

### Motivation

We can use `Collection` instead of `List` parameter type in `FutureUtil` for better compatibility.
For example when we need to use the values of `Map`:

```java
FutureUtil.waitForAll(map.values());
```
### Modifications

- Use `Collection` instead of `List` parameter type.

(cherry picked from commit 0c694cf)
BewareMyPower pushed a commit that referenced this pull request Jul 27, 2022
…sue. (#15454)

(cherry picked from commit 19f61d5)

To resolve the conflicts, change `FutureUtil#waitForAny`'s parameter
from `Collection` to `List` since #15329 cannot be cherry-picked.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc-not-needed Your PR changes do not impact docs type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants