private boolean execute(){
  final String tag="Scheduled session[" + taskid + "]";
  try {
    if (cancelled) {
      LOG.finer(tag + " cancelled: done");
      return false;
    }
    if (!notifyStateChange(RUNNING,"scan-running")) {
      LOG.finer(tag + " stopped: done");
      return false;
    }
    scanAllDirectories();
  }
 catch (  Exception x) {
    if (LOG.isLoggable(Level.FINEST)) {
      LOG.log(Level.FINEST,tag + " failed to scan: " + x,x);
    }
 else     if (LOG.isLoggable(Level.FINE)) {
      LOG.fine(tag + " failed to scan: " + x);
    }
  }
  return true;
}

private boolean execute ( ) { final String tag = "Scheduled session[" + taskid + "]" ; try { if ( cancelled ) { LOG . finer ( tag + " cancelled: done" ) ; return false ; } if ( ! notifyStateChange ( RUNNING , "scan-running" ) ) { LOG . finer ( tag + " stopped: done" ) ; return false ; } scanAllDirectories ( ) ; } catch ( Exception x ) { if ( LOG . isLoggable ( Level . FINEST ) ) { LOG . log ( Level . FINEST , tag + " failed to scan: " + x , x ) ; } else if ( LOG . isLoggable ( Level . FINE ) ) { LOG . fine ( tag + " failed to scan: " + x ) ; } } return true ; }
invoke all directories scanners in sequence . at each step , checks to see whether the task should stop .
