| Modifier and Type | Class and Description |
|---|---|
| public static interface | |
| public static class |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public String | |
| public CallNotAllowedException | |
| public OciCircuitBreaker. | Returns: the CircuitBreakerConfig of this CircuitBreakerReturns the CircuitBreakerConfig of this CircuitBreaker. |
| public long | Returns: current timestampReturns the current time with respect to the CircuitBreaker currentTimeFunction. |
| public List | |
| public String | |
| public String | |
| public CircuitBreaker | |
| public CircuitBreaker. | |
| public TimeUnit | Returns: the timeUnit of current timestampReturns the timeUnit of current timestamp. |
| public void | |
| public void | |
| public void | |
| public void | |
| public boolean | Returns: true if a permission was acquired and false otherwiseAcquires a permission to execute a call, only if one is available at the time of invocation. |
| acquirePermission | back to summary |
|---|---|
| public void acquirePermission() Try to obtain a permission to execute a call. If a call is not permitted, the number of not permitted calls is increased. Throws a CallNotPermittedException when the state is OPEN or FORCED_OPEN. Returns when the state is CLOSED or DISABLED. Returns when the state is HALF_OPEN and further test calls are allowed. Throws a CallNotPermittedException when the state is HALF_OPEN and the number of test calls has been reached. If the state is HALF_OPEN, the number of allowed test calls is decreased. Important Note Make sure to call onSuccess or onError after the call is finished. If the call is cancelled before it is invoked, you have to release the permission again.
| |
| addToHistory | back to summary |
|---|---|
| public void addToHistory(Throwable throwable, Integer status, Map<String, String> messages) | |
| circuitBreakerCallNotPermittedErrorMessage | back to summary |
|---|---|
| public String circuitBreakerCallNotPermittedErrorMessage(String requestUri) | |
| createCallNotAllowedException | back to summary |
|---|---|
| public CallNotAllowedException createCallNotAllowedException() | |
| getCircuitBreakerConfig | back to summary |
|---|---|
| public OciCircuitBreaker. Returns the CircuitBreakerConfig of this CircuitBreaker.
| |
| getCurrentTimestamp | back to summary |
|---|---|
| public long getCurrentTimestamp() Returns the current time with respect to the CircuitBreaker currentTimeFunction. Returns System.nanoTime() by default.
| |
| getHistory | back to summary |
|---|---|
| public List | |
| getHistoryAsString | back to summary |
|---|---|
| public String getHistoryAsString() | |
| getName | back to summary |
|---|---|
| public String getName() Returns the name of this CircuitBreaker.
| |
| getR4jCircuitBreaker | back to summary |
|---|---|
| public CircuitBreaker getR4jCircuitBreaker() | |
| getState | back to summary |
|---|---|
| public CircuitBreaker. Returns the state of this CircuitBreaker.
| |
| getTimestampUnit | back to summary |
|---|---|
| public TimeUnit getTimestampUnit() Returns the timeUnit of current timestamp. Default is TimeUnit.NANOSECONDS.
| |
| onError | back to summary |
|---|---|
| public void onError(long duration, TimeUnit durationUnit, Throwable throwable) Records a failed call. This method must be invoked when a call failed. | |
| onResult | back to summary |
|---|---|
| public void onResult(long duration, TimeUnit durationUnit, Object result) This method must be invoked when a call returned a result and the result predicate should decide if the call was successful or not. | |
| onSuccess | back to summary |
|---|---|
| public void onSuccess(long duration, TimeUnit durationUnit) Records a successful call. This method must be invoked when a call was successful.
| |
| releasePermission | back to summary |
|---|---|
| public void releasePermission() Releases a permission. Should only be used when a permission was acquired but not used. Otherwise use If the state is HALF_OPEN, the number of allowed test calls is increased by one. | |
| tryAcquirePermission | back to summary |
|---|---|
| public boolean tryAcquirePermission() Acquires a permission to execute a call, only if one is available at the time of invocation. If a call is not permitted, the number of not permitted calls is increased. Returns false when the state is OPEN or FORCED_OPEN. Returns true when the state is CLOSED or DISABLED. Returns true when the state is HALF_OPEN and further test calls are allowed. Returns false when the state is HALF_OPEN and the number of test calls has been reached. If the state is HALF_OPEN, the number of allowed test calls is decreased. Important Note Make sure to call onSuccess or onError after the call is finished. If the call is cancelled before it is invoked, you have to release the permission again.
| |
| Modifier and Type | Class and Description |
|---|---|
| public static interface | OciCircuitBreaker.
An IntervalFunction which can be used to calculate the wait interval. |
| public static enum |
| Modifier and Type | Method and Description |
|---|---|
| public float | |
| public int | |
| public int | |
| public Predicate | |
| public int | |
| public OciCircuitBreaker. | |
| public Duration | |
| public float | |
| public boolean |
| getFailureRateThreshold | back to summary |
|---|---|
| public float getFailureRateThreshold() | |
| getMinimumNumberOfCalls | back to summary |
|---|---|
| public int getMinimumNumberOfCalls() | |
| getPermittedNumberOfCallsInHalfOpenState | back to summary |
|---|---|
| public int getPermittedNumberOfCallsInHalfOpenState() | |
| getRecordExceptionPredicate | back to summary |
|---|---|
| public Predicate | |
| getSlidingWindowSize | back to summary |
|---|---|
| public int getSlidingWindowSize() | |
| getSlidingWindowType | back to summary |
|---|---|
| public OciCircuitBreaker. | |
| getSlowCallDurationThreshold | back to summary |
|---|---|
| public Duration getSlowCallDurationThreshold() | |
| getSlowCallRateThreshold | back to summary |
|---|---|
| public float getSlowCallRateThreshold() | |
| isWritableStackTraceEnabled | back to summary |
|---|---|
| public boolean isWritableStackTraceEnabled() | |
| Modifier and Type | Field and Description |
|---|---|
| public static final OciCircuitBreaker. | |
| public static final OciCircuitBreaker. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static OciCircuitBreaker. | |
| public static OciCircuitBreaker. |
| COUNT_BASED | back to summary |
|---|---|
| public static final OciCircuitBreaker. | |
| TIME_BASED | back to summary |
|---|---|
| public static final OciCircuitBreaker. | |
| SlidingWindowType | back to summary |
|---|---|
| private SlidingWindowType() | |
| valueOf | back to summary |
|---|---|
| public static OciCircuitBreaker. | |
| values | back to summary |
|---|---|
| public static OciCircuitBreaker. | |
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| private final Integer | |
| private final Throwable |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Map | |
| public int | |
| public Throwable | |
| public String |
| messages | back to summary |
|---|---|
| private final Map<String, String> messages | |
| status | back to summary |
|---|---|
| private final Integer status | |
| throwable | back to summary |
|---|---|
| private final Throwable throwable | |
| ErrorHistoryItem | back to summary |
|---|---|
| public ErrorHistoryItem(Throwable throwable, Integer status, Map<String, String> messages) | |
| getMessages | back to summary |
|---|---|
| public Map | |
| getStatus | back to summary |
|---|---|
| public int getStatus() | |
| getThrowable | back to summary |
|---|---|
| public Throwable getThrowable() | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |