@Deprecated
  public void setCacheListener(CacheListener<K, V> aListener) {
    ArrayList<CacheListener<K, V>> col;
    if (aListener == null) {
      col = null;
    } else {
      col = new ArrayList<>(1);
      col.add(aListener);
    }
    synchronized (regionAttributes) {
      regionAttributes.cacheListeners = col;
    }
    regionAttributes.setHasCacheListeners(true);
  }
Sets the CacheListener for the next {@code RegionAttributes} created. Any existing cache
listeners on this factory are removed.

@param aListener a user defined CacheListener, null if no listener
@deprecated as of GemFire 5.0, use {@link #addCacheListener} instead.
geode-core/src/main/java/org/apache/geode/cache/AttributesFactory.java