Package org.dataloader.registries
Class ScheduledDataLoaderRegistry.Builder
java.lang.Object
org.dataloader.registries.ScheduledDataLoaderRegistry.Builder
- Enclosing class:
ScheduledDataLoaderRegistry
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map
<String, DataLoader<?, ?>> private DispatchPredicate
private Duration
private ScheduledExecutorService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
dispatchPredicate
(DispatchPredicate dispatchPredicate) register
(String key, DataLoader<?, ?> dataLoader) This will register a new dataloaderregisterAll
(DataLoaderRegistry otherRegistry) This will combine together the data loaders in this builder with the ones from a previousDataLoaderRegistry
scheduledExecutorService
(ScheduledExecutorService executorService)
-
Field Details
-
scheduledExecutorService
-
dispatchPredicate
-
schedule
-
dataLoaders
-
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
scheduledExecutorService
public ScheduledDataLoaderRegistry.Builder scheduledExecutorService(ScheduledExecutorService executorService) -
schedule
-
dispatchPredicate
-
register
This will register a new dataloader- Parameters:
key
- the key to put the data loader underdataLoader
- the data loader to register- Returns:
- this builder for a fluent pattern
-
registerAll
This will combine together the data loaders in this builder with the ones from a previousDataLoaderRegistry
- Parameters:
otherRegistry
- the previousDataLoaderRegistry
- Returns:
- this builder for a fluent pattern
-
build
- Returns:
- the newly built
ScheduledDataLoaderRegistry
-