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

Reactive cleanup #1572

Merged
merged 4 commits into from
Mar 25, 2020
Merged

Reactive cleanup #1572

merged 4 commits into from
Mar 25, 2020

Conversation

danielkec
Copy link
Contributor

No description provided.

  * Tests clean-up

Signed-off-by: Daniel Kec <daniel.kec@oracle.com>
Signed-off-by: Daniel Kec <daniel.kec@oracle.com>
akarnokd
akarnokd previously approved these changes Mar 24, 2020
tomas-langer
tomas-langer previously approved these changes Mar 24, 2020
Copy link
Member

@tomas-langer tomas-langer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Signed-off-by: Daniel Kec <daniel.kec@oracle.com>
@danielkec danielkec dismissed stale reviews from tomas-langer and akarnokd via 26a59e7 March 24, 2020 12:28
@akarnokd
Copy link
Collaborator

akarnokd commented Mar 24, 2020

Since you reference the PR from the changelog, could you put in the description about what to use instead?

Removal of processor-like operators

The formerly public Flow.Processor implementations performing common operations have been removed. Users should use the respective operators from Single and Multi instead:

// before
// ------
Flow.Publisher<Integer> source = ...
MappingProcessor<Integer, String> mapper = new MappingProcessor<>(Integer::toString);
source.subscribe(mapper);
mapper.subscribe(subscriber);

// after
// -----
Flow.Publisher<Integer> source = ...

Multi.from(source)
     .map(Integer::toString)
     .subscribe(subscriber)

Removal of Flows

The class was providing basic Flow.Publisher implementations (which were implemented incorrectly anyway). Users should pick one of the static methods of Single or Multi instead, which provide the additional benefits of having fluent operators available to them for assembling reactive flows conveniently:

// before
// ------
Flow.Publisher<Integer> just = Flows.singletonPublisher(1);
Flow.Publisher<Object> empty = Flows.emptyPublisher();

// after
// -----
Multi<Integer> just1 = Multi.singleton(1);
Single<Integer> just2 = Single.just(1);

Multi<Object> empty1 = Multi.empty();
Single<Object> empty2 = Single.empty();

akarnokd
akarnokd previously approved these changes Mar 24, 2020
Signed-off-by: Daniel Kec <daniel.kec@oracle.com>
@danielkec
Copy link
Contributor Author

@akarnokd great thx! done

@danielkec danielkec added this to the 2.0.0 milestone Mar 24, 2020
@danielkec danielkec added the reactive Reactive streams and related components label Mar 24, 2020
@danielkec danielkec self-assigned this Mar 24, 2020
@danielkec danielkec merged commit 72e97aa into helidon-io:master Mar 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reactive Reactive streams and related components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants