+ @SuppressWarnings("unchecked")
+ public <L extends DOMDataTreeChangeListener> ListenerRegistration<L> registerShardConfigListener(
+ final YangInstanceIdentifier internalPath,
+ final DOMDataTreeChangeListener delegate) {
+ Preconditions.checkNotNull(delegate, "delegate should not be null");
+
+ LOG.debug("Registering a listener for the configuration shard: {}", internalPath);
+
+ final DataTreeChangeListenerProxy<DOMDataTreeChangeListener> proxy =
+ new DataTreeChangeListenerProxy<>(actorContext, delegate, internalPath);
+ proxy.init(ClusterUtils.PREFIX_CONFIG_SHARD_ID);
+
+ return (ListenerRegistration<L>) proxy;
+ }
+