public void stop() {
   if (_thread != null && _thread.isAlive()) {
     _thread.terminate();
     try {
       _thread.join();
     } catch (InterruptedException e) {
       log.warn("stopping interrupted");
     }
   }
 }