public class CacheCollectors extends Object
CacheStream.collect(Collector)from a supplier of a collector. The problem is that the standard
Collectorsclass doesn't provide Serializable Collectors and no way to extend their functionality, so this class is used instead.
|Modifier and Type||Method and Description|
Creates a collector that is serializable and will upon usage create a collector using the serializable supplier provided by the user.
public static <T,R> Collector<T,?,R> serializableCollector(SerializableSupplier<Collector<T,?,R>> supplier)
T- The input type of the collector
R- The resulting type of the collector
supplier- The supplier to crate the collector that is specifically serializable
serializableCollector(SerializableSupplier)except that the supplier provided must be marshable through ISPN marshalling techniques. Note this is not detected until runtime.
Copyright © 2021 JBoss by Red Hat. All rights reserved.