@SuppressWarnings("unchecked") protected void runAsAPIRateLimitsPermit(ApiCallback cb) throws Exception { synchronized (this.apiPermitGuard) { while (waitUntilPullAvailable()) { if (logger.isDebugEnabled()) { logger.debug("have room to make an API request now"); } cb.run(this, twitter); } } }