public RegionFactory<K, V> setCacheWriter(CacheWriter<K, V> cacheWriter) {
    attrsFactory.setCacheWriter(cacheWriter);
    return this;
  }
Sets the cache writer for the next {@code RegionAttributes} created.

@param cacheWriter the cache writer or null if no cache writer
@return a reference to this RegionFactory object
@see AttributesFactory#setCacheWriter
geode-core/src/main/java/org/apache/geode/cache/RegionFactory.java