- @SuppressWarnings("unchecked")
- @Override
- public <L extends AsyncDataChangeListener<YangInstanceIdentifier, NormalizedNode<?, ?>>>
- ListenerRegistration<L> registerChangeListener(
- final YangInstanceIdentifier path, final L listener,
- final AsyncDataBroker.DataChangeScope scope) {
-
- Preconditions.checkNotNull(path, "path should not be null");
- Preconditions.checkNotNull(listener, "listener should not be null");
-
- LOG.debug("Registering listener: {} for path: {} scope: {}", listener, path, scope);
-
- String shardName = actorContext.getShardStrategyFactory().getStrategy(path).findShard(path);
-
- final DataChangeListenerRegistrationProxy listenerRegistrationProxy =
- new DataChangeListenerRegistrationProxy(shardName, actorContext, listener);
- listenerRegistrationProxy.init(path, scope);
-
- return listenerRegistrationProxy;
- }
-