private void createActorRef() {
   if (slaveActorRef == null) {
     slaveActorRef =
         setup
             .getActorSystem()
             .actorOf(
                 NetconfNodeActor.props(setup, id, schemaRegistry, schemaRepository),
                 id.getName());
   }
 }
 void registerDataTreeChangeListener(final String topologyId, final NodeKey key) {
   LOG.debug("{}: Registering data tree change listener on node {}", id, key);
   dataChangeListenerRegistration =
       setup
           .getDataBroker()
           .registerDataTreeChangeListener(
               new DataTreeIdentifier<>(
                   LogicalDatastoreType.OPERATIONAL,
                   NetconfTopologyUtils.createTopologyNodeListPath(key, topologyId)),
               this);
 }
  private void handleSlaveMountPoint(final DataObjectModification<Node> rootNode) {
    @SuppressWarnings("ConstantConditions")
    final NetconfNode netconfNodeAfter = rootNode.getDataAfter().getAugmentation(NetconfNode.class);

    if (NetconfNodeConnectionStatus.ConnectionStatus.Connected.equals(
        netconfNodeAfter.getConnectionStatus())) {
      createActorRef();
      final String masterAddress =
          netconfNodeAfter.getClusteredConnectionStatus().getNetconfMasterNode();
      final String path =
          NetconfTopologyUtils.createActorPath(
              masterAddress,
              NetconfTopologyUtils.createMasterActorName(
                  id.getName(),
                  netconfNodeAfter.getClusteredConnectionStatus().getNetconfMasterNode()));
      setup.getActorSystem().actorSelection(path).tell(new AskForMasterMountPoint(), slaveActorRef);
    } else {;
      closeActor();
    }
  }