public void pause(){
  pauseLock.lock();
  try {
    paused=true;
  }
  finally {
    pauseLock.unlock();
  }
}

public void pause ( ) { pauseLock . lock ( ) ; try { paused = true ; } finally { pauseLock . unlock ( ) ; } }
pauses the spider crawling .
