Skip to content

A PR for reactive streams support #151

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

Merged
merged 41 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
6e30220
Add a proof-of-concept for "Observer-like" batch loading
AlexandreCarlton May 12, 2024
95540ff
reactive streams support branch
bbakerman May 17, 2024
2cdba8a
Merge remote-tracking branch 'origin/master' into reactive-streams-br…
bbakerman May 17, 2024
1d78255
reactive streams support branch - merged master
bbakerman May 17, 2024
2032e33
Merge remote-tracking branch 'origin/master' into observer-batch-load…
AlexandreCarlton May 18, 2024
6b5a732
Eliminate *BatchObserver in favour of Publisher
AlexandreCarlton May 18, 2024
68d7f54
Use internal Assertions over Java's raw assert
AlexandreCarlton May 18, 2024
a3132b7
Remove handling of Throwable passed into onNext
AlexandreCarlton May 18, 2024
fbeffae
Expose `new*DataLoader` methods for *PublisherBatchLoader
AlexandreCarlton May 18, 2024
b2a662d
Copy/tweak original/ DataLoader tests for publisher equivalents
AlexandreCarlton May 18, 2024
0d0b2f8
Rename '*PublisherBatchLoader' to 'BatchPublisher'
AlexandreCarlton May 18, 2024
14002f6
Ensure DataLoaderSubscriber is only called by one thread
AlexandreCarlton May 18, 2024
0f303a8
Document Subscriber#onNext invocation order
AlexandreCarlton May 18, 2024
ce115fd
Merge branch 'reactive-streams-branch' into observer-batch-loader-pro…
bbakerman May 19, 2024
288be41
Merge pull request #148 from AlexandreCarlton/observer-batch-loader-p…
bbakerman May 19, 2024
e16fa65
Merge remote-tracking branch 'origin/master' into reactive-streams-br…
bbakerman May 20, 2024
a93112a
reactive streams support branch - getting it compiling
bbakerman May 20, 2024
74567fe
Making the Subscribers use a common base class
bbakerman May 21, 2024
4396624
Making the Subscribers use a common base class- synchronized on each …
bbakerman May 21, 2024
8a64483
Making the Subscribers use a common base class- now with failing test…
bbakerman May 21, 2024
3e8ac9c
Making the Subscribers use a common base class- fail the overall CF o…
bbakerman May 21, 2024
eb2b40c
Inline BatchPublisher tests into DataLoaderTest
AlexandreCarlton May 20, 2024
651e561
Fix MappedBatchPublisher loaders to work without cache
AlexandreCarlton May 20, 2024
8295396
Merge pull request #155 from AlexandreCarlton/migrate-publisher-tests
bbakerman May 22, 2024
86ec5c8
Merge remote-tracking branch 'origin/reactive-streams-branch' into re…
bbakerman May 22, 2024
6d3c4eb
Making the Subscribers use a common base class - merged in main branch
bbakerman May 22, 2024
3fddb8b
Merge pull request #154 from graphql-java/reactive-streams-common-pub…
bbakerman May 22, 2024
034c68f
More tests for Publishers
bbakerman May 22, 2024
b09ac60
Merge remote-tracking branch 'origin/master' into reactive-streams-br…
bbakerman May 23, 2024
5d826b8
Merge remote-tracking branch 'origin/master' into reactive-streams-br…
bbakerman May 23, 2024
8b344db
Now the builds pass - broken out the fixtures
bbakerman May 23, 2024
e9bfc2b
Merge pull request #158 from graphql-java/reactive-streams-branch-ext…
bbakerman May 23, 2024
91d3036
This moves the reactive code pout into its own package because DataLo…
bbakerman May 24, 2024
e98621b
renamed classes inline with their counterparts
bbakerman May 24, 2024
6523015
made them non public and created a static factory support class
bbakerman May 24, 2024
170ccf8
reorged method placement
bbakerman May 24, 2024
77fd0dd
Merge pull request #159 from graphql-java/reactive-streams-branch-mov…
bbakerman May 24, 2024
4b9356e
Added javadoc to publisher interfaces
bbakerman May 24, 2024
3c3cc99
Have MappedBatchPublisher take in a Set<K> keys
AlexandreCarlton May 26, 2024
2e82858
Add README sections for `*BatchPublisher`
AlexandreCarlton May 26, 2024
c3e6ee5
Merge pull request #160 from AlexandreCarlton/add-documentation-for-p…
bbakerman May 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
reactive streams support branch - getting it compiling
  • Loading branch information
bbakerman committed May 20, 2024
commit a93112a79f7951ec39aae496739ee009ea9bbe9b
2 changes: 1 addition & 1 deletion src/main/java/org/dataloader/BatchPublisher.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* the future returned by {@link DataLoader#load(Object)} to complete as soon as the individual value is available
* (rather than when all values have been retrieved).
* <p>
* <b>NOTE:</b> It is <b>required </b> that {@link Subscriber#onNext(V)} is invoked on each value in the same order as
* <b>NOTE:</b> It is <b>required </b> that {@link Subscriber#onNext(Object)} is invoked on each value in the same order as
* the provided keys.
*
* @param <K> type parameter indicating the type of keys to use for data load requests.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import org.dataloader.fixtures.User;
import org.dataloader.fixtures.UserManager;
import org.dataloader.impl.CompletableFutureKit;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import reactor.core.publisher.Flux;

import java.util.ArrayList;
Expand All @@ -30,12 +30,12 @@
import static org.dataloader.DataLoaderOptions.newOptions;
import static org.dataloader.fixtures.TestKit.listFrom;
import static org.dataloader.impl.CompletableFutureKit.cause;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.empty;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertThat;
import static org.junit.jupiter.api.Assertions.assertArrayEquals;

public class DataLoaderBatchPublisherTest {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.dataloader;

import org.junit.Test;
import org.junit.jupiter.api.Test;
import reactor.core.publisher.Flux;

import java.util.ArrayList;
Expand All @@ -19,10 +19,10 @@
import static org.dataloader.DataLoaderOptions.newOptions;
import static org.dataloader.fixtures.TestKit.listFrom;
import static org.dataloader.impl.CompletableFutureKit.cause;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;

public class DataLoaderMappedBatchPublisherTest {

Expand Down