public boolean isValid() {
    if (!isValid) {
      return false;
    }

    if (getMaxInactiveInterval() >= 0) {
      long now = System.currentTimeMillis();
      return now - attributes.getLastAccessedTime() < getMaxInactiveInterval() * 1000;
    }

    return true;
  }
Determine whether the session is still valid or whether it has expired.

@return true or false
extensions/geode-modules-session-internal/src/main/java/org/apache/geode/modules/session/internal/filter/GemfireHttpSession.java