Skip to content

Commit 9f2ab16

Browse files
authored
Merge pull request #61 from graphql-java/update-pr-about-dispatch-counts
The PR 56 followup work
2 parents 0b54f86 + 565752e commit 9f2ab16

27 files changed

+174
-24
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,5 @@ dependencies {
6161

6262
task wrapper(type: Wrapper) {
6363
gradleVersion = '4.0'
64-
distributionUrl = "http://services.gradle.org/distributions/gradle-4.0-all.zip"
64+
distributionUrl = "https://services.gradle.org/distributions/gradle-4.0-all.zip"
6565
}

gradle/publishing.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ apply plugin: 'com.jfrog.bintray'
44
publishing {
55
repositories {
66
maven {
7-
url 'http://dl.bintray.com/bbakerman/java-dataloader'
7+
url 'https://dl.bintray.com/bbakerman/java-dataloader'
88
}
99
}
1010
}
@@ -52,7 +52,7 @@ publishing {
5252
licenses {
5353
license {
5454
name 'The Apache Software License, Version 2.0'
55-
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
55+
url 'https://www.apache.org/licenses/LICENSE-2.0.txt'
5656
distribution 'repo'
5757
}
5858
}

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=http\://services.gradle.org/distributions/gradle-4.0-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-all.zip

src/main/java/org/dataloader/BatchLoader.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
* @author <a href="https://github.com/bbakerman/">Brad Baker</a>
7272
*/
7373
@FunctionalInterface
74+
@PublicSpi
7475
public interface BatchLoader<K, V> {
7576

7677
/**

src/main/java/org/dataloader/BatchLoaderContextProvider.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* provide overall calling context to the {@link org.dataloader.BatchLoader} call. A common use
66
* case is for propagating user security credentials or database connection parameters for example.
77
*/
8+
@PublicSpi
89
public interface BatchLoaderContextProvider {
910
/**
1011
* @return a context object that may be needed in batch load calls

src/main/java/org/dataloader/BatchLoaderEnvironment.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
* This object is passed to a batch loader as calling context. It could contain security credentials
1313
* of the calling users for example or database parameters that allow the data layer call to succeed.
1414
*/
15+
@PublicApi
1516
public class BatchLoaderEnvironment {
1617

1718
private final Object context;

src/main/java/org/dataloader/BatchLoaderEnvironmentProvider.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* the {@link org.dataloader.BatchLoader} call. A common use
77
* case is for propagating user security credentials or database connection parameters.
88
*/
9+
@PublicSpi
910
public interface BatchLoaderEnvironmentProvider {
1011
/**
1112
* @return a {@link org.dataloader.BatchLoaderEnvironment} that may be needed in batch calls

src/main/java/org/dataloader/BatchLoaderWithContext.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* See {@link org.dataloader.BatchLoader} for more details on the design invariants that you must implement in order to
1212
* use this interface.
1313
*/
14+
@PublicSpi
1415
public interface BatchLoaderWithContext<K, V> {
1516
/**
1617
* Called to batch load the provided keys and return a promise to a list of values. This default

src/main/java/org/dataloader/CacheMap.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
* @author <a href="https://github.com/aschrijver/">Arnold Schrijver</a>
3636
* @author <a href="https://github.com/bbakerman/">Brad Baker</a>
3737
*/
38+
@PublicSpi
3839
public interface CacheMap<U, V> {
3940

4041
/**

src/main/java/org/dataloader/DataLoader.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
* @author <a href="https://github.com/aschrijver/">Arnold Schrijver</a>
5555
* @author <a href="https://github.com/bbakerman/">Brad Baker</a>
5656
*/
57+
@PublicApi
5758
public class DataLoader<K, V> {
5859

5960
private final DataLoaderHelper<K, V> helper;
@@ -470,7 +471,7 @@ public CompletableFuture<List<V>> loadMany(List<K> keys, List<Object> keyContext
470471
* @return the promise of the queued load requests
471472
*/
472473
public CompletableFuture<List<V>> dispatch() {
473-
return helper.dispatch().futureList;
474+
return helper.dispatch().getPromisedResults();
474475
}
475476

476477
/**
@@ -480,9 +481,9 @@ public CompletableFuture<List<V>> dispatch() {
480481
* If batching is disabled, or there are no queued requests, then a succeeded promise with no entries dispatched is
481482
* returned.
482483
*
483-
* @return the promise of the queued load requests and the number of entries dispatched.
484+
* @return the promise of the queued load requests and the number of keys dispatched.
484485
*/
485-
public DataLoaderHelper.DispatchResult<V> dispatchWithCounts() {
486+
public DispatchResult<V> dispatchWithCounts() {
486487
return helper.dispatch();
487488
}
488489

0 commit comments

Comments
 (0)