@Override public Runnable poll(long timeout, TimeUnit unit) throws InterruptedException { Call result = underlyingQueue.poll(timeout, unit); updateMetrics(result); return result; }
@Override public Runnable remove() { Call result = underlyingQueue.remove(); updateMetrics(result); return result; }
@Override public Runnable poll() { Call result = underlyingQueue.poll(); updateMetrics(result); return result; }
@Override public Runnable take() throws InterruptedException { Call result = underlyingQueue.take(); updateMetrics(result); return result; }
@Override public int drainTo(Collection<? super Runnable> destination, int maxElements) { if (destination == this) { throw new IllegalArgumentException( "A BlockingQueue cannot drain to itself."); } List<Call> drained = new ArrayList<>(); underlyingQueue.drainTo(drained, maxElements); for (Call r : drained) { updateMetrics(r); } destination.addAll(drained); int sz = drained.size(); LOG.info("Elements drained: " + sz); return sz; }
@Override public Runnable take() throws InterruptedException { Call result = underlyingQueue.take(); updateMetrics(result); return result; }
@Override public Runnable poll() { Call result = underlyingQueue.poll(); updateMetrics(result); return result; }
@Override public Runnable poll(long timeout, TimeUnit unit) throws InterruptedException { Call result = underlyingQueue.poll(timeout, unit); updateMetrics(result); return result; }
@Override public Runnable remove() { Call result = underlyingQueue.remove(); updateMetrics(result); return result; }
@Override public Runnable take() throws InterruptedException { Call result = underlyingQueue.take(); updateMetrics(result); return result; }
@Override public Runnable poll() { Call result = underlyingQueue.poll(); updateMetrics(result); return result; }
@Override public Runnable poll() { Call result = underlyingQueue.poll(); updateMetrics(result); return result; }
@Override public Runnable remove() { Call result = underlyingQueue.remove(); updateMetrics(result); return result; }
@Override public Runnable take() throws InterruptedException { Call result = underlyingQueue.take(); updateMetrics(result); return result; }
@Override public Runnable poll(long timeout, TimeUnit unit) throws InterruptedException { Call result = underlyingQueue.poll(timeout, unit); updateMetrics(result); return result; }
@Override public Runnable poll(long timeout, TimeUnit unit) throws InterruptedException { Call result = underlyingQueue.poll(timeout, unit); updateMetrics(result); return result; }
@Override public Runnable remove() { Call result = underlyingQueue.remove(); updateMetrics(result); return result; }
@Override public int drainTo(Collection<? super Runnable> destination, int maxElements) { if (destination == this) { throw new IllegalArgumentException( "A BlockingQueue cannot drain to itself."); } List<Call> drained = new ArrayList<>(); underlyingQueue.drainTo(drained, maxElements); for (Call r : drained) { updateMetrics(r); } destination.addAll(drained); int sz = drained.size(); LOG.info("Elements drained: " + sz); return sz; }
@Override public int drainTo(Collection<? super Runnable> destination, int maxElements) { if (destination == this) { throw new IllegalArgumentException( "A BlockingQueue cannot drain to itself."); } List<Call> drained = new ArrayList<>(); underlyingQueue.drainTo(drained, maxElements); for (Call r : drained) { updateMetrics(r); } destination.addAll(drained); int sz = drained.size(); LOG.info("Elements drained: " + sz); return sz; }
@Override public int drainTo(Collection<? super Runnable> destination, int maxElements) { if (destination == this) { throw new IllegalArgumentException( "A BlockingQueue cannot drain to itself."); } List<Call> drained = new ArrayList<Call>(); underlyingQueue.drainTo(drained, maxElements); for (Call r : drained) { updateMetrics(r); } destination.addAll(drained); int sz = drained.size(); LOG.info("Elements drained: " + sz); return sz; }