Interface BatchLoaderScheduler


public interface BatchLoaderScheduler
By default, when DataLoader.dispatch() is called, the BatchLoader / MappedBatchLoader function will be invoked immediately. However, you can provide your own BatchLoaderScheduler that allows this call to be done some time into the future. You will be passed a callback (BatchLoaderScheduler.ScheduledBatchLoaderCall / BatchLoaderScheduler.ScheduledMappedBatchLoaderCall and you are expected to eventually call this callback method to make the batch loading happen.

Note: Because there is a DataLoaderOptions.maxBatchSize() it is possible for this scheduling to happen N times for a given DataLoader.dispatch() call. The total set of keys will be sliced into batches themselves and then the BatchLoaderScheduler will be called for each batch of keys. Do not assume that a single call to DataLoader.dispatch() results in a single call to BatchLoaderScheduler.