org.hibernate.search.batchindexing
Class IdentifierProducer
java.lang.Object
org.hibernate.search.batchindexing.IdentifierProducer
- All Implemented Interfaces:
- java.lang.Runnable
public class IdentifierProducer
- extends java.lang.Object
- implements java.lang.Runnable
This Runnable is going to feed the indexing queue
with the identifiers of all the entities going to be indexed.
This step in the indexing process is not parallel (should be
done by one thread per type) so that a single transaction is used
to define the group of entities to be indexed.
Produced identifiers are put in the destination queue grouped in List
instances: the reason for this is to load them in batches
in the next step and reduce contention on the queue.
- Author:
- Sanne Grinovero
|
Method Summary |
void |
run()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IdentifierProducer
public IdentifierProducer(ProducerConsumerQueue<java.util.List<java.io.Serializable>> fromIdentifierListToEntities,
org.hibernate.SessionFactory sessionFactory,
int objectLoadingBatchSize,
java.lang.Class<?> indexedType,
MassIndexerProgressMonitor monitor,
long objectsLimit)
- Parameters:
fromIdentifierListToEntities - the target queue where the produced identifiers are sent tosessionFactory - the Hibernate SessionFactory to use to load entitiesobjectLoadingBatchSize - affects mostly the next consumer: IdentifierConsumerEntityProducerindexedType - the entity type to be loadedmonitor - to monitor indexing progressobjectsLimit - if not zero
run
public void run()
- Specified by:
run in interface java.lang.Runnable
Copyright © 2006-2010 Hibernate. All Rights Reserved.