Class HibernateOrmMassEntityLoader<E,I>
java.lang.Object
org.hibernate.search.mapper.orm.loading.impl.HibernateOrmMassEntityLoader<E,I>
- All Implemented Interfaces:
AutoCloseable,PojoMassEntityLoader<I>
public final class HibernateOrmMassEntityLoader<E,I>
extends Object
implements PojoMassEntityLoader<I>
-
Constructor Summary
ConstructorsConstructorDescriptionHibernateOrmMassEntityLoader(HibernateOrmQueryLoader<E, ?> typeGroupLoader, HibernateOrmMassLoadingContext options, PojoMassEntitySink<E> sink, SessionImplementor session) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes thisPojoMassEntityLoader.voidLoads the entities corresponding to the given identifiers and adds them to the given sink, blocking the current thread while doing so.
-
Constructor Details
-
HibernateOrmMassEntityLoader
public HibernateOrmMassEntityLoader(HibernateOrmQueryLoader<E, ?> typeGroupLoader, HibernateOrmMassLoadingContext options, PojoMassEntitySink<E> sink, SessionImplementor session)
-
-
Method Details
-
close
public void close()Description copied from interface:PojoMassEntityLoaderCloses thisPojoMassEntityLoader.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfacePojoMassEntityLoader<E>
-
load
Description copied from interface:PojoMassEntityLoaderLoads the entities corresponding to the given identifiers and adds them to the given sink, blocking the current thread while doing so.Calls to the sink must be performed synchronously (before this method returns).
Entities must be passed to the sink using a single call to
PojoMassEntitySink.accept(List).Entities passed to the sink do not need to be the same order as
identifiers.- Specified by:
loadin interfacePojoMassEntityLoader<E>- Parameters:
identifiers- A list of identifiers of entities to load.- Throws:
InterruptedException- If the thread was interrupted while performing I/O operations. This will lead to aborting mass indexing completely.
-