spring-geode/src/main/java/org/springframework/geode/core/io/ResourceWriter.java
/**
	 * Composes this {@link ResourceWriter} with the given {@link ResourceWriter}
	 * using the {@literal Composite Software Design Pattern}.
	 *
	 * @param writer {@link ResourceWriter} to compose with this writer.
	 * @return a composite {@link ResourceWriter} composed of this {@link ResourceWriter}
	 * and the given {@link ResourceWriter}. If the given {@link ResourceWriter} is {@literal null},
	 * then this {@link ResourceWriter} is returned.
	 * @see <a href="https://en.wikipedia.org/wiki/Composite_pattern">Compsite Software Design Pattern</a>
	 * @see ResourceWriter
	 */
Composes this  ResourceWriter with the given  ResourceWriter
using the  Composite Software Design Pattern.

@param writer  ResourceWriter to compose with this writer.
@return a composite  ResourceWriter composed of this  ResourceWriter
and the given  ResourceWriter. If the given  ResourceWriter is  null,
then this  ResourceWriter is returned.
@see Compsite Software Design Pattern
@see ResourceWriter
Composes this ResourceWriter with the given ResourceWriter using the Composite Software Design Pattern . @param writer ResourceWriter to compose with this writer . @return a composite ResourceWriter composed of this ResourceWriter and the given ResourceWriter . If the given ResourceWriter is null then this ResourceWriter is returned . @see Compsite Software Design Pattern @see ResourceWriter
default ResourceWriter thenWriteTo(ResourceWriter writer) {
		return writer == null ? this
			: (resource, data) -> {
				try {
					this.write(resource, data);
				}
				catch (UnhandledResourceException ignore) {
					writer.write(resource, data);
				}
			};
	}
default ResourceWriter thenWriteTo ( ResourceWriter writer ) { return writer == null ? this : ( resource , data ) -> { try { this . write ( resource , data ) ; } catch ( UnhandledResourceException ignore ) { writer . write ( resource , data ) ; } } ; }
Composes this {@link ResourceWriter} with the given {@link ResourceWriter}
 using the {@literal Composite Software Design Pattern}.
Composes this { @link ResourceWriter } with the given { @link ResourceWriter } using the { @literal Composite Software Design Pattern } .