Code example for ScheduledThreadPoolExecutor

Methods: setContinueExistingPeriodicTasksAfterShutdownPolicy, setExecuteExistingDelayedTasksAfterShutdownPolicy

0
/*     */  
/* 209 */     if (service != null) {
/* 210 */       this.executorService = service;
/* 211 */       this.ownExecutor = false;
/*     */     } else { 
/* 213 */       ScheduledThreadPoolExecutor s = new ScheduledThreadPoolExecutor(1);
/*     */  
/* 215 */       s.setContinueExistingPeriodicTasksAfterShutdownPolicy(false);
/* 216 */       s.setExecuteExistingDelayedTasksAfterShutdownPolicy(false);
/* 217 */       this.executorService = s;
/* 218 */       this.ownExecutor = true;
/*     */     } 
/*     */  
/* 221 */     setLimit(limit);
/*     */   } 
/*     */  
/*     */   public final synchronized int getLimit() 
/*     */   { 
/* 232 */     return this.limit;
/*     */   } 
/*     */