private boolean start ( ) { if ( scheduledFuture == null || scheduledFuture . isCancelled ( ) ) { scheduledFuture = scheduler . scheduleWithFixedDelay ( cacheManagingTask , delay , delay , TimeUnit . MINUTES ) ; if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "{} Cache Manager Started." , cache . getClass ( ) . getSimpleName ( ) ) ; } return true ; } return false ; }
To Start the CacheManager it needs to be called only once . Because of that calls in constructor . CacheManager will run its TimerTask every delay number of seconds .