All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.ray.streaming.api.collector.CollectionCollector Maven / Gradle / Ivy

There is a newer version: 1.10.0
Show newest version
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