Class TrafficMaxLaneFlow.MaxFlow

  • All Implemented Interfaces:
    java.io.Serializable, org.apache.beam.sdk.transforms.ProcessFunction<java.lang.Iterable<org.apache.beam.examples.complete.TrafficMaxLaneFlow.LaneInfo>,​org.apache.beam.examples.complete.TrafficMaxLaneFlow.LaneInfo>, org.apache.beam.sdk.transforms.SerializableFunction<java.lang.Iterable<org.apache.beam.examples.complete.TrafficMaxLaneFlow.LaneInfo>,​org.apache.beam.examples.complete.TrafficMaxLaneFlow.LaneInfo>
    Enclosing class:
    TrafficMaxLaneFlow

    public static class TrafficMaxLaneFlow.MaxFlow
    extends java.lang.Object
    implements org.apache.beam.sdk.transforms.SerializableFunction<java.lang.Iterable<org.apache.beam.examples.complete.TrafficMaxLaneFlow.LaneInfo>,​org.apache.beam.examples.complete.TrafficMaxLaneFlow.LaneInfo>
    A custom 'combine function' used with the Combine.perKey transform. Used to find the max lane flow over all the data points in the Window. Extracts the lane flow from the input string and determines whether it's the max seen so far. We're using a custom combiner instead of the Max transform because we want to retain the additional information we've associated with the flow value.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      MaxFlow()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.beam.examples.complete.TrafficMaxLaneFlow.LaneInfo apply​(java.lang.Iterable<org.apache.beam.examples.complete.TrafficMaxLaneFlow.LaneInfo> input)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MaxFlow

        public MaxFlow()
    • Method Detail

      • apply

        public org.apache.beam.examples.complete.TrafficMaxLaneFlow.LaneInfo apply​(java.lang.Iterable<org.apache.beam.examples.complete.TrafficMaxLaneFlow.LaneInfo> input)
        Specified by:
        apply in interface org.apache.beam.sdk.transforms.ProcessFunction<java.lang.Iterable<org.apache.beam.examples.complete.TrafficMaxLaneFlow.LaneInfo>,​org.apache.beam.examples.complete.TrafficMaxLaneFlow.LaneInfo>
        Specified by:
        apply in interface org.apache.beam.sdk.transforms.SerializableFunction<java.lang.Iterable<org.apache.beam.examples.complete.TrafficMaxLaneFlow.LaneInfo>,​org.apache.beam.examples.complete.TrafficMaxLaneFlow.LaneInfo>