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