All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.dataloader.DispatchResult Maven / Gradle / Ivy

There is a newer version: 2022-09-12T23-25-35-08559ba
Show newest version
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