Commit 60d3d1cc authored by Ronak Sakhuja's avatar Ronak Sakhuja
Browse files

fixed imports

parent 10566f42
Pipeline #55254 failed with stages
in 6 minutes and 37 seconds
......@@ -15,12 +15,15 @@
package org.opengroup.osdu.azure.resiliency;
import io.github.resilience4j.circuitbreaker.CircuitBreakerConfig;
import io.github.resilience4j.circuitbreaker.CircuitBreakerRegistry;
import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import java.time.Duration;
/**
* Configuration for CircuitBreaker.
*/
......@@ -34,7 +37,7 @@ public class AzureCircuitBreakerConfiguration {
* Constructor which initializes CircuitBreakerRegistry.
*/
public AzureCircuitBreakerConfiguration() {
this.circuitBreakerRegistry = this.createCBR();
this.setCBR();
}
private boolean enable = false;
......@@ -44,9 +47,8 @@ public class AzureCircuitBreakerConfiguration {
/**
* Create CircuitBreakerRegistry.
* @return newly created CircuitBreakerRegistry.
*/
private CircuitBreakerRegistry createCBR() {
private void setCBR() {
// TODO : THIS CHANGE IS ONLY FOR TESTING PURPOSE ON DEV
CircuitBreakerConfig circuitBreakerConfig = CircuitBreakerConfig.custom()
.failureRateThreshold(50)
......@@ -57,11 +59,9 @@ public class AzureCircuitBreakerConfiguration {
.build();
// Create a CircuitBreakerRegistry with a custom global configuration
CircuitBreakerRegistry circuitBreakerRegistry =
CircuitBreakerRegistry.of(circuitBreakerConfig);
this.circuitBreakerRegistry = CircuitBreakerRegistry.of(circuitBreakerConfig);
// circuitBreakerRegistry =
// CircuitBreakerRegistry.ofDefaults();
// return circuitBreakerRegistry;
return circuitBreakerRegistry;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment