public class CacheCollectors extends Object
CacheStream.collect(Collector)
from a supplier of a collector. The problem is that the
standard Collectors
class doesn't provide Serializable Collectors and no way to extend
their functionality, so this class is used instead.Modifier and Type | Method and Description |
---|---|
static <T,R> Collector<T,?,R> |
collector(Supplier<Collector<T,?,R>> supplier)
Similar to
serializableCollector(SerializableSupplier) except that the supplier provided
must be marshable through ISPN marshalling techniques. |
static <T,R> Collector<T,?,R> |
serializableCollector(SerializableSupplier<Collector<T,?,R>> supplier)
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 collectorR
- The resulting type of the collectorsupplier
- The supplier to crate the collector that is specifically serializableSerializableSupplier
public static <T,R> Collector<T,?,R> collector(Supplier<Collector<T,?,R>> supplier)
serializableCollector(SerializableSupplier)
except that the supplier provided
must be marshable through ISPN marshalling techniques. Note this is not detected until runtime.T
- The input type of the collectorR
- The resulting type of the collectorsupplier
- The marshallable supplier of collectorsExternalizer
,
AdvancedExternalizer
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.