/**
  * @param dataLoader
  * @param batchSize
  * @param maxBatchSize
  * @param delay
  * @param idxMgr
  * @param lsnrList the list of IndexingEventListeners. This should be a <b>Synchronized</b> list
  *     if the content of this list is mutable.
  */
 public BatchedIndexDataLoader(
     DataConsumer<ZoieIndexable> dataLoader,
     int batchSize,
     int maxBatchSize,
     long delay,
     SearchIndexManager<R> idxMgr,
     ZoieIndexableInterpreter<V> interpreter,
     Queue<IndexingEventListener> lsnrList) {
   _maxBatchSize = Math.max(maxBatchSize, 1);
   _batchSize = Math.min(batchSize, _maxBatchSize);
   _delay = delay;
   _dataLoader = dataLoader;
   _batchList = new LinkedList<DataEvent<ZoieIndexable>>();
   _lastFlushTime = 0L;
   _eventCount = 0;
   _loadMgrThread = new LoaderThread();
   _loadMgrThread.setName("disk indexer data loader");
   _stop = false;
   _flush = false;
   _idxMgr = idxMgr;
   _interpreter = interpreter;
   _lsnrList = lsnrList;
 }
 /** Starts the build-in indexing thread. */
 public void start() {
   _loadMgrThread.setName(String.valueOf(this));
   _loadMgrThread.start();
 }