Interface BatchLoaderScheduler

    • Method Detail

      • scheduleBatchLoader

        <K,​V> java.util.concurrent.CompletionStage<java.util.List<V>> scheduleBatchLoader​(BatchLoaderScheduler.ScheduledBatchLoaderCall<V> scheduledCall,
                                                                                                java.util.List<K> keys,
                                                                                                BatchLoaderEnvironment environment)
        This is called to schedule a BatchLoader call.
        Type Parameters:
        K - the key type
        V - the value type
        Parameters:
        scheduledCall - the callback that needs to be invoked to allow the BatchLoader to proceed.
        keys - this is the list of keys that will be passed to the BatchLoader. This is provided only for informative reasons, and you can't change the keys that are used
        environment - this is the BatchLoaderEnvironment in place, which can be null if it's a simple BatchLoader call
        Returns:
        a promise to the values that come from the BatchLoader