code: public static <T, R> Collector<T, ?, R> collector(Supplier<Collector<T, ?, R>> supplier) {
        return new CollectorSupplier<>(supplier);
     }
docs: Similar to {@link CacheCollectors#serializableCollector(SerializableSupplier)} except that the supplier provided
  must be marshable through ISPN marshalling techniques.  Note this is not detected until runtime.
  @param supplier The marshallable supplier of collectors
  @param <T> The input type of the collector
  @param <R> The resulting type of the collector
  @return the collector which is serializable
  @see Externalizer
  @see org.infinispan.commons.marshall.AdvancedExternalizer