private void acquirePermits(int permits, String op) throws IOException { try { Closeable closeable = getRateLimiter().acquirePermits(permits); if (closeable == null) { throw new NotEnoughPermitsException(op); } } catch (InterruptedException e) { throw new NotEnoughPermitsException(op, e); } }
private void acquirePermits(int permits, String op) throws IOException { try { Closeable closeable = getRateLimiter().acquirePermits(permits); if (closeable == null) { throw new NotEnoughPermitsException(op); } } catch (InterruptedException e) { throw new NotEnoughPermitsException(op, e); } }