code: public boolean needsRefresh() {
          boolean needsRefresh;
  
          this.refreshLock.readLock().lock();
          long now = System.currentTimeMillis();
          long tokenDuration = (now - this.lastRefresh);
          needsRefresh = (tokenDuration >= this.expires - REFRESH_EPSILON);
          this.refreshLock.readLock().unlock();
  
          return needsRefresh;
      }
docs: Determines if this connection's access token has expired and needs to be refreshed.
  @return true if the access token needs to be refreshed; otherwise false.