import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.StampedLock;
-import javax.annotation.Nonnull;
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
/**
* @param path Path to find a node for
* @return A registration node for the specified path
*/
- @Nonnull protected final RegistrationTreeNode<T> findNodeFor(@Nonnull final Iterable<PathArgument> path) {
+ protected final @NonNull RegistrationTreeNode<T> findNodeFor(final @NonNull Iterable<PathArgument> path) {
RegistrationTreeNode<T> walkNode = rootNode;
for (final PathArgument arg : path) {
walkNode = walkNode.ensureChild(arg);
* @param node Tree node
* @param registration Registration instance
*/
- protected final void addRegistration(@Nonnull final RegistrationTreeNode<T> node, @Nonnull final T registration) {
+ protected final void addRegistration(final @NonNull RegistrationTreeNode<T> node, final @NonNull T registration) {
node.addRegistration(registration);
}
* @param node Tree node
* @param registration Registration instance
*/
- protected final void removeRegistration(@Nonnull final RegistrationTreeNode<T> node,
- @Nonnull final T registration) {
+ protected final void removeRegistration(final @NonNull RegistrationTreeNode<T> node,
+ final @NonNull T registration) {
// Take the write lock
writeLock.lock();
try {
*
* @return A snapshot instance.
*/
- @Nonnull public final RegistrationTreeSnapshot<T> takeSnapshot() {
+ public final @NonNull RegistrationTreeSnapshot<T> takeSnapshot() {
readLock.lock();
return new RegistrationTreeSnapshot<>(readLock, rootNode);
}