}
public void run() {
ErrorHandler errorHandler = searchFactory.getErrorHandler();
try {
final EntityKeyMetadata keyMetadata = metadata( sessionFactory, indexedType );
final SessionAwareRunnable consumer = new TupleIndexer( indexedType, monitor, sessionFactory, searchFactory, cacheMode, batchBackend, errorHandler );
gridDialect.forEachTuple( new OptionallyWrapInJTATransaction( sessionFactory, errorHandler, consumer ), keyMetadata );
}
catch ( RuntimeException re ) {
// being this an async thread we want to make sure everything is somehow reported