org.dataloader.DispatchResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-dataloader Show documentation
Show all versions of java-dataloader Show documentation
A pure Java 8 port of Facebook Dataloader
package org.dataloader;
import org.dataloader.annotations.PublicApi;
import java.util.List;
import java.util.concurrent.CompletableFuture;
/**
* When a DataLoader is dispatched this object holds the promised results and also the count of key asked for
* via methods like {@link org.dataloader.DataLoader#load(Object)} or {@link org.dataloader.DataLoader#loadMany(java.util.List)}
*
* @param for two
*/
@PublicApi
public class DispatchResult {
private final CompletableFuture> futureList;
private final int keysCount;
public DispatchResult(CompletableFuture> futureList, int keysCount) {
this.futureList = futureList;
this.keysCount = keysCount;
}
public CompletableFuture> getPromisedResults() {
return futureList;
}
public int getKeysCount() {
return keysCount;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy