Interface Streaming.StopStrategy

All Known Implementing Classes:
Streaming.StopConfiguration
Enclosing class:
Streaming

public static interface Streaming.StopStrategy
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Maximum duration the lifecycle should run in ms.
    long
    Maximum records to read.
    long
    The system time in millis when the lifecycle started.
    boolean
    Check if the stop strategy is active according specified conditions.
    boolean
    shouldStop(long read)
    Check the stop strategy conditions.
  • Method Details

    • isActive

      boolean isActive()
      Check if the stop strategy is active according specified conditions.
      Returns:
      true if strategy is active, false otherwise.
    • shouldStop

      boolean shouldStop(long read)
      Check the stop strategy conditions.
      Parameters:
      read - - already read records.
      Returns:
      true if the lifecycle should be stopped, false otherwise.
    • getMaxReadRecords

      Maximum records to read.
      Returns:
      max number of records to read.
    • getMaxActiveTime

      Maximum duration the lifecycle should run in ms.
      Returns:
      max activity duration.
    • getStartedAtTime

      The system time in millis when the lifecycle started.
      Returns:
      started time.