@Test public void testExecute() throws Exception { IPieTask task = Mockito.mock(IPieTask.class); PieExecutorService instance = PieExecutorService.newCachedPieExecutorService(); instance.execute(task); Mockito.verify(task, Mockito.timeout(1000).times(1)).run(); }
@Override public void execute(IPieTask task) { Validate.notNull(task); try{ PieLogger.trace(this.getClass(), "Executing {}", task); super.execute(task); } catch(NullPointerException ex) { PieLogger.info(this.getClass(), "Exception in PieExecutorService!", ex); } }
PieExecutorService extends ThreadPoolExecutor implements IExecutorService, IShutdownableService { @Override public void execute(IPieTask task) { Validate.notNull(task); try{ PieLogger.trace(this.getClass(), "Executing {}", task); super.execute(task); } catch(NullPointerException ex) { PieLogger.info(this.getClass(), "Exception in PieExecutorService!", ex); } } }
PieExecutorService extends ThreadPoolExecutor implements IExecutorService, IShutdownableService { @Override public void execute(IPieTask task) { Validate.notNull(task); try{ PieLogger.trace(this.getClass(), "Executing {}", task); super.execute(task); } catch(NullPointerException ex) { PieLogger.info(this.getClass(), "Exception in PieExecutorService!", ex); } } PieExecutorService(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue);  PieExecutorService(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory);  PieExecutorService(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, RejectedExecutionHandler handler);  PieExecutorService(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory, RejectedExecutionHandler handler); }
PieExecutorService extends ThreadPoolExecutor implements IExecutorService, IShutdownableService { @Override public void execute(IPieTask task) { Validate.notNull(task); try{ PieLogger.trace(this.getClass(), "Executing {}", task); super.execute(task); } catch(NullPointerException ex) { PieLogger.info(this.getClass(), "Exception in PieExecutorService!", ex); } } PieExecutorService(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue);  PieExecutorService(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory);  PieExecutorService(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, RejectedExecutionHandler handler);  PieExecutorService(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory, RejectedExecutionHandler handler); static PieExecutorService newCachedPieExecutorService(); void setExecutorFactory(IPieExecutorTaskFactory executorFactory); @Override void execute(IPieTask task); @Override void handlePieEvent(IPieEvent event); @Override void shutdown(); }
PieExecutorService extends ThreadPoolExecutor implements IExecutorService, IShutdownableService { @Override public void execute(IPieTask task) { Validate.notNull(task); try{ PieLogger.trace(this.getClass(), "Executing {}", task); super.execute(task); } catch(NullPointerException ex) { PieLogger.info(this.getClass(), "Exception in PieExecutorService!", ex); } } PieExecutorService(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue);  PieExecutorService(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory);  PieExecutorService(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, RejectedExecutionHandler handler);  PieExecutorService(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue, ThreadFactory threadFactory, RejectedExecutionHandler handler); static PieExecutorService newCachedPieExecutorService(); void setExecutorFactory(IPieExecutorTaskFactory executorFactory); @Override void execute(IPieTask task); @Override void handlePieEvent(IPieEvent event); @Override void shutdown();  }