예제 #1
0
 /** stops periodic updating of caches. */
 public void shutdown() {
   if (!started) {
     return;
   }
   while (!cacheManager.isFirstIndexingComplete()) {
     logger.info("waiting for first indexing before shutdown...");
   }
   autoRefresh.stop();
   try {
     refreshThread.join();
   } catch (InterruptedException e) {
   }
   logger.info("waiting for cache manager shutdown...");
   cacheManager.shutdown();
   started = false;
   logger.info("refresh completed, task cancelled.");
 }
 @Override
 public void onPause() {
   super.onPause();
   removeRefresh();
   if (autoRefreshTask != null) autoRefreshTask.cancel(true);
 }