@Test public void testOneTimeSchedule() throws InterruptedException { AtomicInteger i = new AtomicInteger(); Incrementer r = new Incrementer(i); t.schedule(r, DELAY); Thread.sleep(DELAY + PAD); assertEquals(1, i.get()); r.cancel(); }
public ScheduledFuture<?> schedule(Runnable task, long delay) { return executor.schedule(task, delay, TimeUnit.MILLISECONDS); }
SimpleTimer { public ScheduledFuture<?> schedule(Runnable task, long delay) { return executor.schedule(task, delay, TimeUnit.MILLISECONDS); } }
SimpleTimer { public ScheduledFuture<?> schedule(Runnable task, long delay) { return executor.schedule(task, delay, TimeUnit.MILLISECONDS); } private  SimpleTimer(int threadPoolSize); }
SimpleTimer { public ScheduledFuture<?> schedule(Runnable task, long delay) { return executor.schedule(task, delay, TimeUnit.MILLISECONDS); } private  SimpleTimer(int threadPoolSize); static synchronized SimpleTimer getInstance(int threadPoolSize); static synchronized SimpleTimer getInstance(AccumuloConfiguration conf); ScheduledFuture<?> schedule(Runnable task, long delay); ScheduledFuture<?> schedule(Runnable task, long delay, long period); }
SimpleTimer { public ScheduledFuture<?> schedule(Runnable task, long delay) { return executor.schedule(task, delay, TimeUnit.MILLISECONDS); } private  SimpleTimer(int threadPoolSize); static synchronized SimpleTimer getInstance(int threadPoolSize); static synchronized SimpleTimer getInstance(AccumuloConfiguration conf); ScheduledFuture<?> schedule(Runnable task, long delay); ScheduledFuture<?> schedule(Runnable task, long delay, long period);  }