Interface Streaming.StopStrategy
- All Known Implementing Classes:
Streaming.StopConfiguration
- Enclosing class:
- Streaming
public static interface Streaming.StopStrategy
-
Method Summary
Modifier and TypeMethodDescriptionlongMaximum duration the lifecycle should run in ms.longMaximum records to read.longThe system time in millis when the lifecycle started.booleanisActive()Check if the stop strategy is active according specified conditions.booleanshouldStop(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
Check the stop strategy conditions.- Parameters:
read- - already read records.- Returns:
- true if the lifecycle should be stopped, false otherwise.
-
getMaxReadRecords
long getMaxReadRecords()Maximum records to read.- Returns:
- max number of records to read.
-
getMaxActiveTime
long getMaxActiveTime()Maximum duration the lifecycle should run in ms.- Returns:
- max activity duration.
-
getStartedAtTime
long getStartedAtTime()The system time in millis when the lifecycle started.- Returns:
- started time.
-