@Override
  public Set keys() {
    checkReadiness();
    if (!restoreSetOperationTransactionBehavior) {
      discoverJTA();
    }
    return Collections.unmodifiableSet(new KeysSet());
  }
This method returns set of all the keys of this PartitionedRegion(locally or remotely).

@return set of all the keys of this PartitionedRegion

        OVERRIDES
geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java