- monitorIdOptional.ifPresent(aLong -> AlivenessMonitorUtils.stopArpMonitoring(alivenessManager, aLong));
- removeMipAdjacency(macEntry.getIpAddress().getHostAddress(),
- macEntry.getVpnName(), macEntry.getInterfaceName(), tx);
- VpnUtil.removeLearntVpnVipToPort(dataBroker, macEntry.getVpnName(),
- macEntry.getIpAddress().getHostAddress());
- CheckedFuture<Void, TransactionCommitFailedException> txFutures = tx.submit();
- try {
- txFutures.get();
- } catch (InterruptedException | ExecutionException e) {
- LOG.error("Error writing to datastore {}", e);
- }
- futures.add(txFutures);
+ monitorIdOptional.ifPresent(monitorId -> {
+ AlivenessMonitorUtils.stopArpMonitoring(alivenessManager, monitorId);
+ removeMipAdjacency(macEntry.getIpAddress().getHostAddress(),
+ macEntry.getVpnName(), macEntry.getInterfaceName());
+ VpnUtil.removeLearntVpnVipToPort(dataBroker, macEntry.getVpnName(),
+ macEntry.getIpAddress().getHostAddress());
+ });