- rwLock.writeLock().unlock();
- }
- }
-
- /**
- * Obtain a tree walking context. This context ensures a consistent view of
- * the listener registrations. The context should be closed as soon as it
- * is not required, because each unclosed instance blocks modification of
- * the listener tree.
- *
- * @return A walker instance.
- */
- public ListenerWalker getWalker() {
- /*
- * TODO: The only current user of this method is local to the datastore.
- * Since this class represents a read-lock, losing a reference to
- * it is a _major_ problem, as the registration process will get
- * wedged, eventually grinding the system to a halt. Should an
- * external user exist, make the Walker a phantom reference, which
- * will cleanup the lock if not told to do so.
- */
- final ListenerWalker ret = new ListenerWalker(rwLock.readLock(), rootNode);
- rwLock.readLock().lock();
- return ret;
- }
-
- abstract static class DataChangeListenerRegistrationImpl<T extends AsyncDataChangeListener<YangInstanceIdentifier, NormalizedNode<?, ?>>> extends AbstractListenerRegistration<T> //
- implements DataChangeListenerRegistration<T> {
- public DataChangeListenerRegistrationImpl(final T listener) {
- super(listener);