@Test public void createMeterTest() { outer.post(url, "foo", json); verify(inner).post(url, "foo", json); }
@Override public ListenableFuture<Integer> post( final String path, final String shardKey, final Map json) { return tasks.add(new Callable<ListenableFuture<Integer>>() { @Override public ListenableFuture<Integer> call() throws Exception { return inner.post(path, shardKey, json); } }); }
LimitedRemote implements Remote { @Override public ListenableFuture<Integer> post( final String path, final String shardKey, final Map json) { return tasks.add(new Callable<ListenableFuture<Integer>>() { @Override public ListenableFuture<Integer> call() throws Exception { return inner.post(path, shardKey, json); } }); } }
LimitedRemote implements Remote { @Override public ListenableFuture<Integer> post( final String path, final String shardKey, final Map json) { return tasks.add(new Callable<ListenableFuture<Integer>>() { @Override public ListenableFuture<Integer> call() throws Exception { return inner.post(path, shardKey, json); } }); } LimitedRemote(Remote inner, int maxConcurrency, int highWaterMark); }
LimitedRemote implements Remote { @Override public ListenableFuture<Integer> post( final String path, final String shardKey, final Map json) { return tasks.add(new Callable<ListenableFuture<Integer>>() { @Override public ListenableFuture<Integer> call() throws Exception { return inner.post(path, shardKey, json); } }); } LimitedRemote(Remote inner, int maxConcurrency, int highWaterMark); @Override ListenableFuture<Integer> post(
            final String path,
            final String shardKey,
            final Map json); @Override boolean shutdown(long timeout, TimeUnit timeUnit); }
LimitedRemote implements Remote { @Override public ListenableFuture<Integer> post( final String path, final String shardKey, final Map json) { return tasks.add(new Callable<ListenableFuture<Integer>>() { @Override public ListenableFuture<Integer> call() throws Exception { return inner.post(path, shardKey, json); } }); } LimitedRemote(Remote inner, int maxConcurrency, int highWaterMark); @Override ListenableFuture<Integer> post(
            final String path,
            final String shardKey,
            final Map json); @Override boolean shutdown(long timeout, TimeUnit timeUnit);  }