import org.opendaylight.genius.mdsalutil.MDSALUtil;
import org.opendaylight.genius.mdsalutil.MatchInfoBase;
import org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager;
-import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
+import org.opendaylight.infrautils.utils.concurrent.LoggingFutures;
import org.opendaylight.mdsal.binding.api.DataBroker;
import org.opendaylight.mdsal.binding.api.ReadTransaction;
import org.opendaylight.mdsal.binding.api.ReadWriteTransaction;
String requestKey = String.valueOf(intRequestKey);
SettableFuture<RpcResult<AcquireElementCountersRequestHandlerOutput>> result = SettableFuture.create();
- ListenableFutures.addErrorLogging(
+ LoggingFutures.addErrorLogging(
txRunner.callWithNewReadWriteTransactionAndSubmit(transaction -> {
if (input.getIncomingTraffic() != null) {
Optional<EgressElementCountersRequestConfig> eecrcOpt =
.child(CounterRequests.class, new CounterRequestsKey(input.getHandler())).build();
SettableFuture<RpcResult<ReleaseElementCountersRequestHandlerOutput>> result = SettableFuture.create();
- ListenableFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(tx -> {
+ LoggingFutures.addErrorLogging(txRunner.callWithNewReadWriteTransactionAndSubmit(tx -> {
Optional<IngressElementCountersRequestConfig> iecrcOpt =
tx.read(LogicalDatastoreType.CONFIGURATION, CountersServiceUtils.IECRC_IDENTIFIER).get();
Optional<EgressElementCountersRequestConfig> eecrcOpt =
}
private void deleteCounterRequest(CounterRequests counterRequest, ElementCountersDirection direction) {
- ListenableFutures.addErrorLogging(
+ LoggingFutures.addErrorLogging(
txRunner.callWithNewWriteOnlyTransactionAndSubmit(tx -> {
if (ElementCountersDirection.INGRESS.equals(direction)) {
tx.delete(LogicalDatastoreType.CONFIGURATION, InstanceIdentifier
}
private void initializeCountrsConfigDataSrore() {
- ListenableFutures.addErrorLogging(
+ LoggingFutures.addErrorLogging(
txRunner.callWithNewReadWriteTransactionAndSubmit(transaction -> {
Optional<IngressElementCountersRequestConfig> iecrcOpt =
transaction.read(LogicalDatastoreType.CONFIGURATION,
EgressElementCountersRequestConfigBuilder ecrcb = new EgressElementCountersRequestConfigBuilder();
ecrcb.setCounterRequests(counterRequests);
requestConfig = ecrcb.build();
- transaction.put(LogicalDatastoreType.CONFIGURATION, ecrcIdentifier, requestConfig);
+ transaction.mergeParentStructurePut(LogicalDatastoreType.CONFIGURATION, ecrcIdentifier, requestConfig);
}
private void creatIngressEelementCountersContainerInConfig(ReadWriteTransaction transaction,
List<CounterRequests> counterRequests = new ArrayList<>();
iecrcb.setCounterRequests(counterRequests);
IngressElementCountersRequestConfig iecrc = iecrcb.build();
- transaction.put(LogicalDatastoreType.CONFIGURATION, ecrcIdentifier, iecrc);
+ transaction.mergeParentStructurePut(LogicalDatastoreType.CONFIGURATION, ecrcIdentifier, iecrc);
}
private void creatEgressEelementCountersContainerInConfig(ReadWriteTransaction transaction,
List<CounterRequests> counterRequests = new ArrayList<>();
eecrcb.setCounterRequests(counterRequests);
EgressElementCountersRequestConfig eecrc = eecrcb.build();
- transaction.put(LogicalDatastoreType.CONFIGURATION, ecrcIdentifier, eecrc);
+ transaction.mergeParentStructurePut(LogicalDatastoreType.CONFIGURATION, ecrcIdentifier, eecrc);
}
private Integer allocateId(String idKey) {