Interface MassLoadingStrategy<E,I>
- Type Parameters:
E- The type of loaded entities.I- The type of entity identifiers.
A strategy for mass loading, used in particular during mass indexing.
-
Method Summary
Modifier and TypeMethodDescriptioncreateEntityLoader(LoadingTypeGroup<E> includedTypes, MassEntitySink<E> sink, MassLoadingOptions options) createIdentifierLoader(LoadingTypeGroup<E> includedTypes, MassIdentifierSink<I> sink, MassLoadingOptions options) booleanstatic <E,I> MassLoadingStrategy<E, I> Creates a simple map-based loading strategy.inthashCode()
-
Method Details
-
fromMap
Creates a simple map-based loading strategy.Generally only useful for tests.
- Type Parameters:
E- The type of loaded entities.I- The type of entity identifiers.- Parameters:
map- A map from containing all entity identifiers as keys, and the corresponding entity as value.- Returns:
- A loading strategy that loads entities from the given map.
-
equals
-
hashCode
int hashCode() -
createIdentifierLoader
MassIdentifierLoader createIdentifierLoader(LoadingTypeGroup<E> includedTypes, MassIdentifierSink<I> sink, MassLoadingOptions options) - Parameters:
includedTypes- A representation of all entity types that will have to be loaded.sink- A sink to which the entity identifier loader will pass loaded identifiers.options- Loading options configured by the requester (who requested mass indexing, ...).- Returns:
- An entity identifier loader.
-
createEntityLoader
MassEntityLoader<I> createEntityLoader(LoadingTypeGroup<E> includedTypes, MassEntitySink<E> sink, MassLoadingOptions options) - Parameters:
includedTypes- A representation of all entity types that will have to be loaded.sink- A sink to which the entity loader will pass loaded entities.options- Loading options configured by the requester (who requested mass indexing, ...).- Returns:
- An entity loader.
-