예제 #1
0
 @Override
 protected void doStart() {
   log.trace("ReservationCacheImpl.doStart()");
   try {
     schedulerService.startAsync().awaitRunning();
     cacheCleanupSchedule =
         schedulerService.scheduleAtFixedRate(cleanUpCacheRunnable, 1, 1, TimeUnit.MINUTES);
     notifyStarted();
   } catch (Exception e) {
     notifyFailed(e);
   }
 }
예제 #2
0
 @Override
 protected void doStop() {
   log.trace("ReservationCacheImpl.doStop()");
   try {
     cacheCleanupSchedule.cancel(true);
     cacheCleanupSchedule = null;
     schedulerService.stopAsync().awaitTerminated();
     notifyStopped();
   } catch (Exception e) {
     notifyFailed(e);
   }
 }