public void start(){
  lock.lock();
  try {
    if (indexerTask != null)     throw new IllegalStateException();
    indexerTask=new FutureTask<Void>(new IndexerMainTask());
    indexerService.submit(indexerTask);
    parsing.set(true);
  }
  finally {
    lock.unlock();
  }
}

public void start ( ) { lock . lock ( ) ; try { if ( indexerTask != null ) throw new IllegalStateException ( ) ; indexerTask = new FutureTask < Void > ( new IndexerMainTask ( ) ) ; indexerService . submit ( indexerTask ) ; parsing . set ( true ) ; } finally { lock . unlock ( ) ; } }
start the task which will index data as it is parsed .
