Class ScheduledDataLoaderRegistry

java.lang.Object
org.dataloader.DataLoaderRegistry
org.dataloader.registries.ScheduledDataLoaderRegistry
All Implemented Interfaces:
AutoCloseable

@ExperimentalApi public class ScheduledDataLoaderRegistry extends DataLoaderRegistry implements AutoCloseable
This DataLoaderRegistry will use a DispatchPredicate when dispatchAll() is called to test (for each DataLoader in the registry) if a dispatch should proceed. If the predicate returns false, then a task is scheduled to perform that predicate dispatch again via the ScheduledExecutorService.

This will continue to loop (test false and reschedule) until such time as the predicate returns true, in which case no rescheduling will occur and you will need to call dispatch again to restart the process.

If you wanted to create a ScheduledDataLoaderRegistry that started a rescheduling immediately, just create one and call rescheduleNow().

This code is currently marked as ExperimentalApi