io.ray.streaming.api.collector.CollectionCollector Maven / Gradle / Ivy
package io.ray.streaming.api.collector;
import io.ray.streaming.message.Record;
import java.util.List;
/**
* Combination of multiple collectors.
*
* @param The type of output data.
*/
public class CollectionCollector implements Collector {
private List collectorList;
public CollectionCollector(List collectorList) {
this.collectorList = collectorList;
}
@Override
public void collect(T value) {
for (Collector collector : collectorList) {
collector.collect(new Record(value));
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy