@Test public void testOnDataTreeChanged_8() throws Exception { List<DataTreeModification<SxpNodeIdentity>> modificationList = new ArrayList<>(); modificationList.add(getTreeModification(DataObjectModification.ModificationType.SUBTREE_MODIFIED, LogicalDatastoreType.OPERATIONAL, createIdentity(false, "0.0.0.0", 64999, Version.Version4, 120), createIdentity(true, "0.0.0.0", 64999, Version.Version4, 120))); identityListener.onDataTreeChanged(modificationList); verify(sxpNode).start(); }
@Override public synchronized void onDataTreeChanged(@Nonnull Collection<DataTreeModification<SxpNodeIdentity>> changes) { changes.forEach(c -> { final String nodeId = c.getRootPath().getRootIdentifier().firstKeyOf(Node.class).getNodeId().getValue(); final DatastoreAccess nodesDatastoreAccess = getDatastoreAccess(nodeId); if (LogicalDatastoreType.CONFIGURATION.equals(c.getRootPath().getDatastoreType())) { switch (c.getRootNode().getModificationType()) { case WRITE: if (c.getRootNode().getDataBefore() == null) { ConfigLoader.initTopologyNode(nodeId, LogicalDatastoreType.OPERATIONAL, nodesDatastoreAccess); nodesDatastoreAccess.merge(c.getRootPath().getRootIdentifier(), c.getRootNode().getDataAfter(), LogicalDatastoreType.OPERATIONAL); } else if (c.getRootNode().getDataAfter() != null) { nodesDatastoreAccess.merge(c.getRootPath().getRootIdentifier(), new SxpNodeIdentityBuilder(c.getRootNode().getDataAfter()).setSxpDomains(null) .setSxpPeerGroups(null) .build(), LogicalDatastoreType.OPERATIONAL); } case SUBTREE_MODIFIED: if (c.getRootNode().getDataAfter() != null) { subListeners.forEach(l -> { l.handleChange(l.getModifications(c), c.getRootPath().getDatastoreType(), c.getRootPath().getRootIdentifier()); }); break; } case DELETE: nodesDatastoreAccess.checkAndDelete( c.getRootPath().getRootIdentifier().firstIdentifierOf(Node.class), LogicalDatastoreType.OPERATIONAL); break; } } else { final SxpNode node = NodesRegister.getRegisteredNode(nodeId); switch (c.getRootNode().getModificationType()) { case WRITE: if (c.getRootNode().getDataBefore() == null) { ListenableFuture<Boolean> nodeStartFuture = NodesRegister.register( SxpDatastoreNode.createInstance( NodeId.getDefaultInstance(Preconditions.checkNotNull(nodeId)), DatastoreAccess.getInstance(nodesDatastoreAccess), c.getRootNode().getDataAfter())) .start(); nodeStartFuture.addListener(() -> { subListeners.forEach((l) -> { l.handleChange(l.getModifications(c), c.getRootPath().getDatastoreType(), c.getRootPath().getRootIdentifier()); }); }, MoreExecutors.directExecutor()); } else if (c.getRootNode().getDataAfter() == null) { NodesRegister.unRegister(Preconditions.checkNotNull(nodeId)).shutdown(); } break; case SUBTREE_MODIFIED: if (checkDifference(c, SxpNodeFields::isEnabled)) { if (Preconditions.checkNotNull(c.getRootNode().getDataAfter()).isEnabled()) { node.start(); } else { node.shutdown(); } } else if (checkDifference(c, d -> Objects.nonNull(d.getSecurity()) ? d.getSecurity().getPassword() : null) || checkDifference(c, d -> Objects.nonNull(d.getSecurity()) ? d.getSecurity().getTls() : null)) { NodesRegister.getRegisteredNode(nodeId).shutdown(); if (Objects.nonNull(c.getRootNode().getDataAfter())) { NodesRegister.getRegisteredNode(nodeId) .setSecurity(c.getRootNode().getDataAfter().getSecurity()); } else { NodesRegister.getRegisteredNode(nodeId).setSecurity(null); } NodesRegister.getRegisteredNode(nodeId).start(); } else if (checkDifference(c, SxpNodeFields::getVersion) || checkDifference(c, SxpNodeFields::getTcpPort) || checkDifference(c, SxpNodeFields::getSourceIp)) { node.getWorker().addListener(node.shutdown(), node::start); } else if (checkDifference(c, SxpNodeIdentityFields::getTimers)) { node.shutdownConnections(); } else if (Objects.nonNull(c.getRootNode().getDataAfter().getMessageBuffering()) && checkDifference(c, n -> n.getMessageBuffering().getOutBuffer())) { node.setMessagePartitionSize( c.getRootNode().getDataAfter().getMessageBuffering().getOutBuffer()); } else if (Objects.nonNull(c.getRootNode().getDataAfter().getMessageBuffering()) && checkDifference(c, n -> n.getMessageBuffering().getInBuffer())) { node.setMessageMergeSize( c.getRootNode().getDataAfter().getMessageBuffering().getInBuffer()); } subListeners.forEach(l -> { l.handleChange(l.getModifications(c), c.getRootPath().getDatastoreType(), c.getRootPath().getRootIdentifier()); }); break; case DELETE: NodesRegister.unRegister(nodeId); if (node instanceof SxpDatastoreNode) { ((SxpDatastoreNode) node).close(); } else { node.shutdown(); } break; } } }); }
NodeIdentityListener implements ClusteredDataTreeChangeListener<SxpNodeIdentity> { @Override public synchronized void onDataTreeChanged(@Nonnull Collection<DataTreeModification<SxpNodeIdentity>> changes) { changes.forEach(c -> { final String nodeId = c.getRootPath().getRootIdentifier().firstKeyOf(Node.class).getNodeId().getValue(); final DatastoreAccess nodesDatastoreAccess = getDatastoreAccess(nodeId); if (LogicalDatastoreType.CONFIGURATION.equals(c.getRootPath().getDatastoreType())) { switch (c.getRootNode().getModificationType()) { case WRITE: if (c.getRootNode().getDataBefore() == null) { ConfigLoader.initTopologyNode(nodeId, LogicalDatastoreType.OPERATIONAL, nodesDatastoreAccess); nodesDatastoreAccess.merge(c.getRootPath().getRootIdentifier(), c.getRootNode().getDataAfter(), LogicalDatastoreType.OPERATIONAL); } else if (c.getRootNode().getDataAfter() != null) { nodesDatastoreAccess.merge(c.getRootPath().getRootIdentifier(), new SxpNodeIdentityBuilder(c.getRootNode().getDataAfter()).setSxpDomains(null) .setSxpPeerGroups(null) .build(), LogicalDatastoreType.OPERATIONAL); } case SUBTREE_MODIFIED: if (c.getRootNode().getDataAfter() != null) { subListeners.forEach(l -> { l.handleChange(l.getModifications(c), c.getRootPath().getDatastoreType(), c.getRootPath().getRootIdentifier()); }); break; } case DELETE: nodesDatastoreAccess.checkAndDelete( c.getRootPath().getRootIdentifier().firstIdentifierOf(Node.class), LogicalDatastoreType.OPERATIONAL); break; } } else { final SxpNode node = NodesRegister.getRegisteredNode(nodeId); switch (c.getRootNode().getModificationType()) { case WRITE: if (c.getRootNode().getDataBefore() == null) { ListenableFuture<Boolean> nodeStartFuture = NodesRegister.register( SxpDatastoreNode.createInstance( NodeId.getDefaultInstance(Preconditions.checkNotNull(nodeId)), DatastoreAccess.getInstance(nodesDatastoreAccess), c.getRootNode().getDataAfter())) .start(); nodeStartFuture.addListener(() -> { subListeners.forEach((l) -> { l.handleChange(l.getModifications(c), c.getRootPath().getDatastoreType(), c.getRootPath().getRootIdentifier()); }); }, MoreExecutors.directExecutor()); } else if (c.getRootNode().getDataAfter() == null) { NodesRegister.unRegister(Preconditions.checkNotNull(nodeId)).shutdown(); } break; case SUBTREE_MODIFIED: if (checkDifference(c, SxpNodeFields::isEnabled)) { if (Preconditions.checkNotNull(c.getRootNode().getDataAfter()).isEnabled()) { node.start(); } else { node.shutdown(); } } else if (checkDifference(c, d -> Objects.nonNull(d.getSecurity()) ? d.getSecurity().getPassword() : null) || checkDifference(c, d -> Objects.nonNull(d.getSecurity()) ? d.getSecurity().getTls() : null)) { NodesRegister.getRegisteredNode(nodeId).shutdown(); if (Objects.nonNull(c.getRootNode().getDataAfter())) { NodesRegister.getRegisteredNode(nodeId) .setSecurity(c.getRootNode().getDataAfter().getSecurity()); } else { NodesRegister.getRegisteredNode(nodeId).setSecurity(null); } NodesRegister.getRegisteredNode(nodeId).start(); } else if (checkDifference(c, SxpNodeFields::getVersion) || checkDifference(c, SxpNodeFields::getTcpPort) || checkDifference(c, SxpNodeFields::getSourceIp)) { node.getWorker().addListener(node.shutdown(), node::start); } else if (checkDifference(c, SxpNodeIdentityFields::getTimers)) { node.shutdownConnections(); } else if (Objects.nonNull(c.getRootNode().getDataAfter().getMessageBuffering()) && checkDifference(c, n -> n.getMessageBuffering().getOutBuffer())) { node.setMessagePartitionSize( c.getRootNode().getDataAfter().getMessageBuffering().getOutBuffer()); } else if (Objects.nonNull(c.getRootNode().getDataAfter().getMessageBuffering()) && checkDifference(c, n -> n.getMessageBuffering().getInBuffer())) { node.setMessageMergeSize( c.getRootNode().getDataAfter().getMessageBuffering().getInBuffer()); } subListeners.forEach(l -> { l.handleChange(l.getModifications(c), c.getRootPath().getDatastoreType(), c.getRootPath().getRootIdentifier()); }); break; case DELETE: NodesRegister.unRegister(nodeId); if (node instanceof SxpDatastoreNode) { ((SxpDatastoreNode) node).close(); } else { node.shutdown(); } break; } } }); } }
NodeIdentityListener implements ClusteredDataTreeChangeListener<SxpNodeIdentity> { @Override public synchronized void onDataTreeChanged(@Nonnull Collection<DataTreeModification<SxpNodeIdentity>> changes) { changes.forEach(c -> { final String nodeId = c.getRootPath().getRootIdentifier().firstKeyOf(Node.class).getNodeId().getValue(); final DatastoreAccess nodesDatastoreAccess = getDatastoreAccess(nodeId); if (LogicalDatastoreType.CONFIGURATION.equals(c.getRootPath().getDatastoreType())) { switch (c.getRootNode().getModificationType()) { case WRITE: if (c.getRootNode().getDataBefore() == null) { ConfigLoader.initTopologyNode(nodeId, LogicalDatastoreType.OPERATIONAL, nodesDatastoreAccess); nodesDatastoreAccess.merge(c.getRootPath().getRootIdentifier(), c.getRootNode().getDataAfter(), LogicalDatastoreType.OPERATIONAL); } else if (c.getRootNode().getDataAfter() != null) { nodesDatastoreAccess.merge(c.getRootPath().getRootIdentifier(), new SxpNodeIdentityBuilder(c.getRootNode().getDataAfter()).setSxpDomains(null) .setSxpPeerGroups(null) .build(), LogicalDatastoreType.OPERATIONAL); } case SUBTREE_MODIFIED: if (c.getRootNode().getDataAfter() != null) { subListeners.forEach(l -> { l.handleChange(l.getModifications(c), c.getRootPath().getDatastoreType(), c.getRootPath().getRootIdentifier()); }); break; } case DELETE: nodesDatastoreAccess.checkAndDelete( c.getRootPath().getRootIdentifier().firstIdentifierOf(Node.class), LogicalDatastoreType.OPERATIONAL); break; } } else { final SxpNode node = NodesRegister.getRegisteredNode(nodeId); switch (c.getRootNode().getModificationType()) { case WRITE: if (c.getRootNode().getDataBefore() == null) { ListenableFuture<Boolean> nodeStartFuture = NodesRegister.register( SxpDatastoreNode.createInstance( NodeId.getDefaultInstance(Preconditions.checkNotNull(nodeId)), DatastoreAccess.getInstance(nodesDatastoreAccess), c.getRootNode().getDataAfter())) .start(); nodeStartFuture.addListener(() -> { subListeners.forEach((l) -> { l.handleChange(l.getModifications(c), c.getRootPath().getDatastoreType(), c.getRootPath().getRootIdentifier()); }); }, MoreExecutors.directExecutor()); } else if (c.getRootNode().getDataAfter() == null) { NodesRegister.unRegister(Preconditions.checkNotNull(nodeId)).shutdown(); } break; case SUBTREE_MODIFIED: if (checkDifference(c, SxpNodeFields::isEnabled)) { if (Preconditions.checkNotNull(c.getRootNode().getDataAfter()).isEnabled()) { node.start(); } else { node.shutdown(); } } else if (checkDifference(c, d -> Objects.nonNull(d.getSecurity()) ? d.getSecurity().getPassword() : null) || checkDifference(c, d -> Objects.nonNull(d.getSecurity()) ? d.getSecurity().getTls() : null)) { NodesRegister.getRegisteredNode(nodeId).shutdown(); if (Objects.nonNull(c.getRootNode().getDataAfter())) { NodesRegister.getRegisteredNode(nodeId) .setSecurity(c.getRootNode().getDataAfter().getSecurity()); } else { NodesRegister.getRegisteredNode(nodeId).setSecurity(null); } NodesRegister.getRegisteredNode(nodeId).start(); } else if (checkDifference(c, SxpNodeFields::getVersion) || checkDifference(c, SxpNodeFields::getTcpPort) || checkDifference(c, SxpNodeFields::getSourceIp)) { node.getWorker().addListener(node.shutdown(), node::start); } else if (checkDifference(c, SxpNodeIdentityFields::getTimers)) { node.shutdownConnections(); } else if (Objects.nonNull(c.getRootNode().getDataAfter().getMessageBuffering()) && checkDifference(c, n -> n.getMessageBuffering().getOutBuffer())) { node.setMessagePartitionSize( c.getRootNode().getDataAfter().getMessageBuffering().getOutBuffer()); } else if (Objects.nonNull(c.getRootNode().getDataAfter().getMessageBuffering()) && checkDifference(c, n -> n.getMessageBuffering().getInBuffer())) { node.setMessageMergeSize( c.getRootNode().getDataAfter().getMessageBuffering().getInBuffer()); } subListeners.forEach(l -> { l.handleChange(l.getModifications(c), c.getRootPath().getDatastoreType(), c.getRootPath().getRootIdentifier()); }); break; case DELETE: NodesRegister.unRegister(nodeId); if (node instanceof SxpDatastoreNode) { ((SxpDatastoreNode) node).close(); } else { node.shutdown(); } break; } } }); } NodeIdentityListener(DatastoreAccess datastoreAccess); }
NodeIdentityListener implements ClusteredDataTreeChangeListener<SxpNodeIdentity> { @Override public synchronized void onDataTreeChanged(@Nonnull Collection<DataTreeModification<SxpNodeIdentity>> changes) { changes.forEach(c -> { final String nodeId = c.getRootPath().getRootIdentifier().firstKeyOf(Node.class).getNodeId().getValue(); final DatastoreAccess nodesDatastoreAccess = getDatastoreAccess(nodeId); if (LogicalDatastoreType.CONFIGURATION.equals(c.getRootPath().getDatastoreType())) { switch (c.getRootNode().getModificationType()) { case WRITE: if (c.getRootNode().getDataBefore() == null) { ConfigLoader.initTopologyNode(nodeId, LogicalDatastoreType.OPERATIONAL, nodesDatastoreAccess); nodesDatastoreAccess.merge(c.getRootPath().getRootIdentifier(), c.getRootNode().getDataAfter(), LogicalDatastoreType.OPERATIONAL); } else if (c.getRootNode().getDataAfter() != null) { nodesDatastoreAccess.merge(c.getRootPath().getRootIdentifier(), new SxpNodeIdentityBuilder(c.getRootNode().getDataAfter()).setSxpDomains(null) .setSxpPeerGroups(null) .build(), LogicalDatastoreType.OPERATIONAL); } case SUBTREE_MODIFIED: if (c.getRootNode().getDataAfter() != null) { subListeners.forEach(l -> { l.handleChange(l.getModifications(c), c.getRootPath().getDatastoreType(), c.getRootPath().getRootIdentifier()); }); break; } case DELETE: nodesDatastoreAccess.checkAndDelete( c.getRootPath().getRootIdentifier().firstIdentifierOf(Node.class), LogicalDatastoreType.OPERATIONAL); break; } } else { final SxpNode node = NodesRegister.getRegisteredNode(nodeId); switch (c.getRootNode().getModificationType()) { case WRITE: if (c.getRootNode().getDataBefore() == null) { ListenableFuture<Boolean> nodeStartFuture = NodesRegister.register( SxpDatastoreNode.createInstance( NodeId.getDefaultInstance(Preconditions.checkNotNull(nodeId)), DatastoreAccess.getInstance(nodesDatastoreAccess), c.getRootNode().getDataAfter())) .start(); nodeStartFuture.addListener(() -> { subListeners.forEach((l) -> { l.handleChange(l.getModifications(c), c.getRootPath().getDatastoreType(), c.getRootPath().getRootIdentifier()); }); }, MoreExecutors.directExecutor()); } else if (c.getRootNode().getDataAfter() == null) { NodesRegister.unRegister(Preconditions.checkNotNull(nodeId)).shutdown(); } break; case SUBTREE_MODIFIED: if (checkDifference(c, SxpNodeFields::isEnabled)) { if (Preconditions.checkNotNull(c.getRootNode().getDataAfter()).isEnabled()) { node.start(); } else { node.shutdown(); } } else if (checkDifference(c, d -> Objects.nonNull(d.getSecurity()) ? d.getSecurity().getPassword() : null) || checkDifference(c, d -> Objects.nonNull(d.getSecurity()) ? d.getSecurity().getTls() : null)) { NodesRegister.getRegisteredNode(nodeId).shutdown(); if (Objects.nonNull(c.getRootNode().getDataAfter())) { NodesRegister.getRegisteredNode(nodeId) .setSecurity(c.getRootNode().getDataAfter().getSecurity()); } else { NodesRegister.getRegisteredNode(nodeId).setSecurity(null); } NodesRegister.getRegisteredNode(nodeId).start(); } else if (checkDifference(c, SxpNodeFields::getVersion) || checkDifference(c, SxpNodeFields::getTcpPort) || checkDifference(c, SxpNodeFields::getSourceIp)) { node.getWorker().addListener(node.shutdown(), node::start); } else if (checkDifference(c, SxpNodeIdentityFields::getTimers)) { node.shutdownConnections(); } else if (Objects.nonNull(c.getRootNode().getDataAfter().getMessageBuffering()) && checkDifference(c, n -> n.getMessageBuffering().getOutBuffer())) { node.setMessagePartitionSize( c.getRootNode().getDataAfter().getMessageBuffering().getOutBuffer()); } else if (Objects.nonNull(c.getRootNode().getDataAfter().getMessageBuffering()) && checkDifference(c, n -> n.getMessageBuffering().getInBuffer())) { node.setMessageMergeSize( c.getRootNode().getDataAfter().getMessageBuffering().getInBuffer()); } subListeners.forEach(l -> { l.handleChange(l.getModifications(c), c.getRootPath().getDatastoreType(), c.getRootPath().getRootIdentifier()); }); break; case DELETE: NodesRegister.unRegister(nodeId); if (node instanceof SxpDatastoreNode) { ((SxpDatastoreNode) node).close(); } else { node.shutdown(); } break; } } }); } NodeIdentityListener(DatastoreAccess datastoreAccess); void addSubListener(Listener<SxpNodeIdentity, ?> listener); ListenerRegistration<DataTreeChangeListener> register(final DataBroker dataBroker,
            final LogicalDatastoreType datastoreType); @Override synchronized void onDataTreeChanged(@Nonnull Collection<DataTreeModification<SxpNodeIdentity>> changes); }
NodeIdentityListener implements ClusteredDataTreeChangeListener<SxpNodeIdentity> { @Override public synchronized void onDataTreeChanged(@Nonnull Collection<DataTreeModification<SxpNodeIdentity>> changes) { changes.forEach(c -> { final String nodeId = c.getRootPath().getRootIdentifier().firstKeyOf(Node.class).getNodeId().getValue(); final DatastoreAccess nodesDatastoreAccess = getDatastoreAccess(nodeId); if (LogicalDatastoreType.CONFIGURATION.equals(c.getRootPath().getDatastoreType())) { switch (c.getRootNode().getModificationType()) { case WRITE: if (c.getRootNode().getDataBefore() == null) { ConfigLoader.initTopologyNode(nodeId, LogicalDatastoreType.OPERATIONAL, nodesDatastoreAccess); nodesDatastoreAccess.merge(c.getRootPath().getRootIdentifier(), c.getRootNode().getDataAfter(), LogicalDatastoreType.OPERATIONAL); } else if (c.getRootNode().getDataAfter() != null) { nodesDatastoreAccess.merge(c.getRootPath().getRootIdentifier(), new SxpNodeIdentityBuilder(c.getRootNode().getDataAfter()).setSxpDomains(null) .setSxpPeerGroups(null) .build(), LogicalDatastoreType.OPERATIONAL); } case SUBTREE_MODIFIED: if (c.getRootNode().getDataAfter() != null) { subListeners.forEach(l -> { l.handleChange(l.getModifications(c), c.getRootPath().getDatastoreType(), c.getRootPath().getRootIdentifier()); }); break; } case DELETE: nodesDatastoreAccess.checkAndDelete( c.getRootPath().getRootIdentifier().firstIdentifierOf(Node.class), LogicalDatastoreType.OPERATIONAL); break; } } else { final SxpNode node = NodesRegister.getRegisteredNode(nodeId); switch (c.getRootNode().getModificationType()) { case WRITE: if (c.getRootNode().getDataBefore() == null) { ListenableFuture<Boolean> nodeStartFuture = NodesRegister.register( SxpDatastoreNode.createInstance( NodeId.getDefaultInstance(Preconditions.checkNotNull(nodeId)), DatastoreAccess.getInstance(nodesDatastoreAccess), c.getRootNode().getDataAfter())) .start(); nodeStartFuture.addListener(() -> { subListeners.forEach((l) -> { l.handleChange(l.getModifications(c), c.getRootPath().getDatastoreType(), c.getRootPath().getRootIdentifier()); }); }, MoreExecutors.directExecutor()); } else if (c.getRootNode().getDataAfter() == null) { NodesRegister.unRegister(Preconditions.checkNotNull(nodeId)).shutdown(); } break; case SUBTREE_MODIFIED: if (checkDifference(c, SxpNodeFields::isEnabled)) { if (Preconditions.checkNotNull(c.getRootNode().getDataAfter()).isEnabled()) { node.start(); } else { node.shutdown(); } } else if (checkDifference(c, d -> Objects.nonNull(d.getSecurity()) ? d.getSecurity().getPassword() : null) || checkDifference(c, d -> Objects.nonNull(d.getSecurity()) ? d.getSecurity().getTls() : null)) { NodesRegister.getRegisteredNode(nodeId).shutdown(); if (Objects.nonNull(c.getRootNode().getDataAfter())) { NodesRegister.getRegisteredNode(nodeId) .setSecurity(c.getRootNode().getDataAfter().getSecurity()); } else { NodesRegister.getRegisteredNode(nodeId).setSecurity(null); } NodesRegister.getRegisteredNode(nodeId).start(); } else if (checkDifference(c, SxpNodeFields::getVersion) || checkDifference(c, SxpNodeFields::getTcpPort) || checkDifference(c, SxpNodeFields::getSourceIp)) { node.getWorker().addListener(node.shutdown(), node::start); } else if (checkDifference(c, SxpNodeIdentityFields::getTimers)) { node.shutdownConnections(); } else if (Objects.nonNull(c.getRootNode().getDataAfter().getMessageBuffering()) && checkDifference(c, n -> n.getMessageBuffering().getOutBuffer())) { node.setMessagePartitionSize( c.getRootNode().getDataAfter().getMessageBuffering().getOutBuffer()); } else if (Objects.nonNull(c.getRootNode().getDataAfter().getMessageBuffering()) && checkDifference(c, n -> n.getMessageBuffering().getInBuffer())) { node.setMessageMergeSize( c.getRootNode().getDataAfter().getMessageBuffering().getInBuffer()); } subListeners.forEach(l -> { l.handleChange(l.getModifications(c), c.getRootPath().getDatastoreType(), c.getRootPath().getRootIdentifier()); }); break; case DELETE: NodesRegister.unRegister(nodeId); if (node instanceof SxpDatastoreNode) { ((SxpDatastoreNode) node).close(); } else { node.shutdown(); } break; } } }); } NodeIdentityListener(DatastoreAccess datastoreAccess); void addSubListener(Listener<SxpNodeIdentity, ?> listener); ListenerRegistration<DataTreeChangeListener> register(final DataBroker dataBroker,
            final LogicalDatastoreType datastoreType); @Override synchronized void onDataTreeChanged(@Nonnull Collection<DataTreeModification<SxpNodeIdentity>> changes); static final InstanceIdentifier<Topology> SUBSCRIBED_PATH; }