Class ExecutorCircuitBreaker
- java.lang.Object
-
- io.openlineage.client.circuitBreaker.ExecutorCircuitBreaker
-
- All Implemented Interfaces:
CircuitBreaker
- Direct Known Subclasses:
JavaRuntimeCircuitBreaker
,NoOpCircuitBreaker
,SimpleMemoryCircuitBreaker
,StaticCircuitBreaker
public abstract class ExecutorCircuitBreaker extends java.lang.Object implements CircuitBreaker
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Optional<java.time.Duration>
timeout
-
Fields inherited from interface io.openlineage.client.circuitBreaker.CircuitBreaker
CIRCUIT_CHECK_INTERVAL_IN_MILLIS
-
-
Constructor Summary
Constructors Constructor Description ExecutorCircuitBreaker(java.lang.Integer circuitCheckIntervalInMillis)
ExecutorCircuitBreaker(java.lang.Integer circuitCheckIntervalInMillis, java.time.Duration timeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCheckIntervalMillis()
java.util.Optional<java.time.Duration>
getTimeout()
protected boolean
isPercentageValueValid(java.lang.Integer value)
<T> T
run(java.util.concurrent.Callable<T> callable)
Runs callable and breaks it when circuit breaker is closed-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.openlineage.client.circuitBreaker.CircuitBreaker
currentState
-
-
-
-
Method Detail
-
run
public <T> T run(java.util.concurrent.Callable<T> callable)
Description copied from interface:CircuitBreaker
Runs callable and breaks it when circuit breaker is closed- Specified by:
run
in interfaceCircuitBreaker
- Returns:
-
getCheckIntervalMillis
public int getCheckIntervalMillis()
- Specified by:
getCheckIntervalMillis
in interfaceCircuitBreaker
-
getTimeout
public java.util.Optional<java.time.Duration> getTimeout()
-
isPercentageValueValid
protected boolean isPercentageValueValid(java.lang.Integer value)
-
-