public SelectResults getKeys() {
    ResultsCollectionWrapper res;
    if (region instanceof LocalDataSet) {
      LocalDataSet localData = (LocalDataSet) region;
      res = new ResultsCollectionWrapper(getKeyType(), localData.localKeys());
    } else {
      res = new ResultsCollectionWrapper(getKeyType(), region.keySet());
    }
    res.setModifiable(false);
    return res;
  }
Returns unmodifiable SelectResults for keys. When the "keys" attribute is accessed, this is the
preferred method that will be executed.
geode-core/src/main/java/org/apache/geode/cache/query/internal/QRegion.java