Interface MassLoadingStrategy<E,I>

Type Parameters:
E - The type of loaded entities.
I - The type of entity identifiers.

@Incubating public interface MassLoadingStrategy<E,I>
A strategy for mass loading, used in particular during mass indexing.
  • Method Details

    • fromMap

      static <E, I> MassLoadingStrategy<E,I> fromMap(Map<I,E> map)
      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

      boolean equals(Object obj)
      Overrides:
      equals in class Object
      Parameters:
      obj - Another strategy
      Returns:
      true if the other strategy targets the same entity hierarchy and can be used as a replacement for this one. false otherwise or when unsure.
    • hashCode

      int hashCode()
      Overrides:
      hashCode in class Object
    • 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.