@Override
    @SuppressWarnings("unchecked")
    public CacheListener<K, V>[] getCacheListeners() {
      synchronized (this) {
        if (cacheListeners == null || cacheListeners.isEmpty()) {
          return (CacheListener<K, V>[]) EMPTY_LISTENERS;
        } else {
          CacheListener<K, V>[] result = new CacheListener[cacheListeners.size()];
          cacheListeners.toArray(result);
          return result;
        }
      }
    }
Constructs an instance of {@code RegionAttributes} with default settings.

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