Class LivelockDetector.Builder
java.lang.Object
com.tnsai.coordination.choreography.LivelockDetector.Builder
- Enclosing class:
LivelockDetector
Builder for LivelockDetector.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the LivelockDetector.circuitBreakerThreshold(int threshold) Sets the total violation count that trips the circuit breaker.oscillationThreshold(int threshold) Sets the number of alternating state changes that triggers an OSCILLATING_STATE violation.repeatThreshold(int threshold) Sets the number of identical messages within the repeat window that triggers a REPEATED_MESSAGE violation.repeatWindow(Duration window) Sets the time window for counting repeated messages.stallWindow(Duration window) Sets the time window after which no new unique actions triggers a PROGRESS_STALL violation.
-
Method Details
-
repeatThreshold
Sets the number of identical messages within the repeat window that triggers a REPEATED_MESSAGE violation.- Parameters:
threshold- minimum repeat count (must be >= 2)- Returns:
- this builder
-
repeatWindow
Sets the time window for counting repeated messages.- Parameters:
window- time window (must be positive)- Returns:
- this builder
-
oscillationThreshold
Sets the number of alternating state changes that triggers an OSCILLATING_STATE violation.- Parameters:
threshold- minimum alternation count (must be >= 3)- Returns:
- this builder
-
stallWindow
Sets the time window after which no new unique actions triggers a PROGRESS_STALL violation.- Parameters:
window- stall window (must be positive)- Returns:
- this builder
-
circuitBreakerThreshold
Sets the total violation count that trips the circuit breaker.- Parameters:
threshold- circuit breaker threshold (must be >= 1)- Returns:
- this builder
-
build
Builds the LivelockDetector.- Returns:
- configured detector
-