code: public void setLocalityLevel(LocalityLevel level) {
      localityRequired = level;
      lastLocality = level;
      localityWaitStarted = false;
      localityWaitStartTime = Long.MAX_VALUE;
    }
docs: Update the required locality level for the session
  @param level the new required locality level