コード例 #1
0
 public synchronized void scanLibrary() {
   if (scanner == null) {
     scanner = new Thread(this, "Library Scanner");
     scanner.start();
   } else if (scanner.isAlive()) {
     LOGGER.info("Scanner is already running !");
   } else {
     scanner = new Thread(this, "Library Scanner");
     scanner.start();
   }
 }
コード例 #2
0
 public boolean isScanLibraryRunning() {
   return scanner != null && scanner.isAlive();
 }
コード例 #3
0
 public synchronized void stopScanLibrary() {
   if (scanner != null && scanner.isAlive()) {
     PMS.get().getRootFolder(null).stopScan();
   }
 }