@Override
    public CacheListener<K, V> getCacheListener() {
      synchronized (this) {
        if (cacheListeners == null) {
          return null;
        }
        if (cacheListeners.size() == 0) {
          return null;
        }
        if (cacheListeners.size() == 1) {
          return cacheListeners.get(0);
        }
      }
      throw new IllegalStateException(
          "More than one cache listener exists.");
    }
Constructs an instance of {@code RegionAttributes} with default settings.

@see AttributesFactory
geode-core/src/main/java/org/apache/geode/cache/AttributesFactory.java