public class DataLoaderRegistry
extends java.lang.Object
| Constructor and Description |
|---|
DataLoaderRegistry() |
| Modifier and Type | Method and Description |
|---|---|
DataLoaderRegistry |
combine(DataLoaderRegistry registry)
This will combine all the current data loaders in this registry and all the data loaders from the specified registry
and return a new combined registry
|
void |
dispatchAll()
This will called
DataLoader.dispatch() on each of the registered
DataLoaders |
<K,V> DataLoader<K,V> |
getDataLoader(java.lang.String key)
Returns the dataloader that was registered under the specified key
|
java.util.List<DataLoader<?,?>> |
getDataLoaders() |
java.util.Set<java.lang.String> |
getKeys() |
DataLoaderRegistry |
register(java.lang.String key,
DataLoader<?,?> dataLoader)
This will register a new dataloader
|
DataLoaderRegistry |
unregister(java.lang.String key)
This will unregister a new dataloader
|
public DataLoaderRegistry register(java.lang.String key, DataLoader<?,?> dataLoader)
key - the key to put the data loader underdataLoader - the data loader to registerpublic DataLoaderRegistry combine(DataLoaderRegistry registry)
registry - the registry to combine into this registrypublic java.util.List<DataLoader<?,?>> getDataLoaders()
public DataLoaderRegistry unregister(java.lang.String key)
key - the key of the data loader to unregisterpublic <K,V> DataLoader<K,V> getDataLoader(java.lang.String key)
K - the type of keysV - the type of valueskey - the key of the data loaderpublic java.util.Set<java.lang.String> getKeys()
public void dispatchAll()
DataLoader.dispatch() on each of the registered
DataLoaders