SentinelLeakyBucket extends AbstractStartStoppable implements LeakyBucket { @Override protected void doStop() throws Exception { if(future != null) { future.cancel(true); future = null; } } SentinelLeakyBucket(ConsoleConfig config, ScheduledExecutorService scheduled); @Override boolean tryAcquire(); @Override void release(); void delayRelease(long time, TimeUnit timeUnit); @Override void resize(int newSize); @Override int references(); @Override int getTotalSize(); static int PERIODIC_MILLI; }
@Test public void testDoStop() { }