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

io.ray.streaming.operator.impl.FilterOperator Maven / Gradle / Ivy

package io.ray.streaming.operator.impl;

import io.ray.streaming.api.function.impl.FilterFunction;
import io.ray.streaming.message.Record;
import io.ray.streaming.operator.OneInputOperator;
import io.ray.streaming.operator.StreamOperator;

public class FilterOperator extends StreamOperator>
    implements OneInputOperator {

  public FilterOperator(FilterFunction filterFunction) {
    super(filterFunction);
  }

  @Override
  public void processElement(Record record) throws Exception {
    if (this.function.filter(record.getValue())) {
      this.collect(record);
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy