import static com.google.common.base.Preconditions.checkState;
import static java.util.Objects.requireNonNull;
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import org.opendaylight.mdsal.binding.api.DataBroker;
import org.opendaylight.mdsal.binding.api.Transaction;
import org.opendaylight.mdsal.binding.api.TransactionChain;
import org.opendaylight.mdsal.dom.api.DOMRpcService;
import org.opendaylight.netconf.sal.connect.util.RemoteDeviceId;
import org.opendaylight.yangtools.concepts.ObjectRegistration;
-import org.opendaylight.yangtools.yang.model.api.SchemaContext;
+import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class NetconfDeviceSalProvider implements AutoCloseable {
-
private static final Logger LOG = LoggerFactory.getLogger(NetconfDeviceSalProvider.class);
private final RemoteDeviceId id;
}
public NetconfDeviceTopologyAdapter getTopologyDatastoreAdapter() {
- checkState(topologyDatastoreAdapter != null,
- "%s: Sal provider %s was not initialized by sal. Cannot get topology datastore adapter", id);
- return topologyDatastoreAdapter;
+ final NetconfDeviceTopologyAdapter local = topologyDatastoreAdapter;
+ checkState(local != null,
+ "%s: Sal provider %s was not initialized by sal. Cannot get topology datastore adapter", id, this);
+ return local;
}
+ @SuppressFBWarnings(value = "UPM_UNCALLED_PRIVATE_METHOD",
+ justification = "https://github.com/spotbugs/spotbugs/issues/811")
private void resetTransactionChainForAdapaters() {
txChain = requireNonNull(dataBroker).createTransactionChain(transactionChainListener);
-
topologyDatastoreAdapter.setTxChain(txChain);
-
LOG.trace("{}: Resetting TransactionChain {}", id, txChain);
-
}
@Override
this.id = requireNonNull(id);
}
- public void onTopologyDeviceConnected(final SchemaContext initialCtx,
+ public void onTopologyDeviceConnected(final EffectiveModelContext initialCtx,
final DOMDataBroker broker, final DOMRpcService rpc,
final NetconfDeviceNotificationService newNotificationService) {
onTopologyDeviceConnected(initialCtx, broker, rpc, newNotificationService, null);
}
- public synchronized void onTopologyDeviceConnected(final SchemaContext initialCtx,
+ public synchronized void onTopologyDeviceConnected(final EffectiveModelContext initialCtx,
final DOMDataBroker broker, final DOMRpcService rpc,
final NetconfDeviceNotificationService newNotificationService, final DOMActionService deviceAction) {
requireNonNull(mountService, "Closed");