code: public boolean isConnectionStale() {
          if (lastUsedTime == 0)
              return false;
  
          long currentTime = System.currentTimeMillis();
          long timeSinceLastUse = currentTime - lastUsedTime;
          return (timeSinceLastUse > MAX_KEEPALIVE);
      }
docs: Checks whether or not this connection has been used recently enough
  to still be considered usable