@Test public void testGetTotalSize() { when(consoleConfig.isSentinelRateLimitOpen()).thenReturn(true); when(consoleConfig.getSentinelRateLimitSize()).thenReturn(3); leakyBucket = new SentinelLeakyBucket(consoleConfig, scheduled); Assert.assertEquals(3, leakyBucket.getTotalSize()); }
@Override public int getTotalSize() { return origin.getTotalSize(); }
SentinelLeakyBucket extends AbstractStartStoppable implements LeakyBucket { @Override public int getTotalSize() { return origin.getTotalSize(); } }
SentinelLeakyBucket extends AbstractStartStoppable implements LeakyBucket { @Override public int getTotalSize() { return origin.getTotalSize(); } SentinelLeakyBucket(ConsoleConfig config, ScheduledExecutorService scheduled); }
SentinelLeakyBucket extends AbstractStartStoppable implements LeakyBucket { @Override public int getTotalSize() { return origin.getTotalSize(); } 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(); }
SentinelLeakyBucket extends AbstractStartStoppable implements LeakyBucket { @Override public int getTotalSize() { return origin.getTotalSize(); } 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; }