private RegionAttributes<K, V> createRegionAttributes() {
    RegionAttributes<K, V> ra = attrsFactory.create();
    if (isEmpty(ra.getPoolName())
        || Objects.equals(GemFireCacheImpl.DEFAULT_POOL_NAME, ra.getPoolName())) {
      UserSpecifiedRegionAttributes<K, V> ura = (UserSpecifiedRegionAttributes<K, V>) ra;
      if (ura.requiresPoolName) {
        Pool dp = getDefaultPool();
        if (dp != null) {
          attrsFactory.setPoolName(dp.getName());
          ra = attrsFactory.create();
        } else {
          throw new IllegalStateException("The poolName must be set on a client.");
        }
      }
    }
    return ra;
  }
Returns the cache used by this factory.
geode-core/src/main/java/org/apache/geode/cache/client/internal/ClientRegionFactoryImpl.java