Interface ThroughputLimiter

    • Method Detail

      • setup

        default void setup​(java.util.Map<java.lang.String,​java.lang.Object> cfg)
        Setup the limiter with given configuration.
        Parameters:
        cfg - configuration (scoped to a (operator) defined prefix)
      • getPauseTime

        java.time.Duration getPauseTime​(ThroughputLimiter.Context context)
        Retrieve the amount of time the source should pause processing for. If the reader should proceed without pausing return Duration.ZERO. Note that this method is called for each input element and must be therefore cheap.
        Parameters:
        context - context for the limiter
        Returns:
        the amount of time to pause the source for.
      • close

        void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable