Class NullThroughputEstimator<T>

  • All Implemented Interfaces:
    java.io.Serializable, ThroughputEstimator<T>

    public class NullThroughputEstimator<T>
    extends java.lang.Object
    implements ThroughputEstimator<T>
    NoOp implementation of a throughput estimator. This will always return 0 as the throughput and it will warn users that this is being used (it should not be used in production).
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double getFrom​(com.google.cloud.Timestamp time)
      Always returns 0.
      void update​(com.google.cloud.Timestamp timeOfRecords, T element)
      NoOp.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.beam.sdk.io.gcp.spanner.changestreams.estimator.ThroughputEstimator

        get
    • Constructor Detail

      • NullThroughputEstimator

        public NullThroughputEstimator()
    • Method Detail

      • update

        public void update​(com.google.cloud.Timestamp timeOfRecords,
                           T element)
        NoOp.
        Specified by:
        update in interface ThroughputEstimator<T>
        Parameters:
        timeOfRecords - ignored
        element - ignored
      • getFrom

        public double getFrom​(com.google.cloud.Timestamp time)
        Always returns 0.
        Specified by:
        getFrom in interface ThroughputEstimator<T>
        Parameters:
        time - ignored
        Returns:
        0