class DataTreeChangeListenerProxy extends AbstractListenerRegistration<T> {

    void init(final String shardName) {
        Future<ActorRef> findFuture = actorUtils.findLocalShardAsync(shardName);
        findFuture.onComplete(new OnComplete<ActorRef>() {
            @Override
            public void onComplete(final Throwable failure, final ActorRef shard) {
                if (failure instanceof LocalShardNotFoundException) {
                    LOG.debug("{}: No local shard found for {} - DataTreeChangeListener {} at path {} "
                            + "cannot be registered", logContext(), shardName, getInstance(), registeredPath);
                } else if (failure != null) {
                    LOG.error("{}: Failed to find local shard {} - DataTreeChangeListener {} at path {} "
                            + "cannot be registered", logContext(), shardName, getInstance(), registeredPath,
                            failure);
                } else {
                    doRegistration(shard);
                }
            }
        }, actorUtils.getClientDispatcher());
    }

      DataTreeChangeListenerProxy(final ActorUtils actorUtils, final T listener,
            final YangInstanceIdentifier registeredPath);

}