Code Review
/
nonrtric.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Doc adjustement to transient parameter"
[nonrtric.git]
/
policy-agent
/
src
/
main
/
java
/
org
/
oransc
/
policyagent
/
clients
/
OscA1Client.java
diff --git
a/policy-agent/src/main/java/org/oransc/policyagent/clients/OscA1Client.java
b/policy-agent/src/main/java/org/oransc/policyagent/clients/OscA1Client.java
index
90fbd10
..
a388267
100644
(file)
--- a/
policy-agent/src/main/java/org/oransc/policyagent/clients/OscA1Client.java
+++ b/
policy-agent/src/main/java/org/oransc/policyagent/clients/OscA1Client.java
@@
-25,6
+25,7
@@
import java.util.List;
import org.json.JSONObject;
import org.oransc.policyagent.configuration.RicConfig;
import org.json.JSONObject;
import org.oransc.policyagent.configuration.RicConfig;
+import org.oransc.policyagent.configuration.WebClientConfig;
import org.oransc.policyagent.repository.Policy;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.oransc.policyagent.repository.Policy;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@
-37,6
+38,7
@@
import reactor.core.publisher.Mono;
*/
@SuppressWarnings("squid:S2629") // Invoke method(s) only conditionally
public class OscA1Client implements A1Client {
*/
@SuppressWarnings("squid:S2629") // Invoke method(s) only conditionally
public class OscA1Client implements A1Client {
+ static final int CONCURRENCY_RIC = 1; // How may paralell requests that is sent to one NearRT RIC
public static class UriBuilder implements A1UriBuilder {
private final RicConfig ricConfig;
public static class UriBuilder implements A1UriBuilder {
private final RicConfig ricConfig;
@@
-115,8
+117,8
@@
public class OscA1Client implements A1Client {
private final AsyncRestClient restClient;
private final UriBuilder uri;
private final AsyncRestClient restClient;
private final UriBuilder uri;
- public OscA1Client(RicConfig ricConfig) {
- this(ricConfig, new AsyncRestClient(""));
+ public OscA1Client(RicConfig ricConfig
, WebClientConfig clientConfig
) {
+ this(ricConfig, new AsyncRestClient(""
, clientConfig
));
}
public OscA1Client(RicConfig ricConfig, AsyncRestClient restClient) {
}
public OscA1Client(RicConfig ricConfig, AsyncRestClient restClient) {
@@
-179,7
+181,7
@@
public class OscA1Client implements A1Client {
@Override
public Flux<String> deleteAllPolicies() {
return getPolicyTypeIds() //
@Override
public Flux<String> deleteAllPolicies() {
return getPolicyTypeIds() //
- .flatMap(this::deletePoliciesForType);
+ .flatMap(this::deletePoliciesForType
, CONCURRENCY_RIC
);
}
@Override
}
@Override
@@
-206,6
+208,6
@@
public class OscA1Client implements A1Client {
private Flux<String> deletePoliciesForType(String typeId) {
return getPolicyIdentitiesByType(typeId) //
private Flux<String> deletePoliciesForType(String typeId) {
return getPolicyIdentitiesByType(typeId) //
- .flatMap(policyId -> deletePolicyById(typeId, policyId));
+ .flatMap(policyId -> deletePolicyById(typeId, policyId)
, CONCURRENCY_RIC
);
}
}
}
}