T
- Type of registered objectpublic abstract class AbstractRegistrationTree<T> extends Object
Modifier | Constructor and Description |
---|---|
protected |
AbstractRegistrationTree() |
Modifier and Type | Method and Description |
---|---|
protected void |
addRegistration(RegistrationTreeNode<T> node,
T registration)
Add a registration to a particular node.
|
protected RegistrationTreeNode<T> |
findNodeFor(Iterable<org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument> path)
Find an existing, or allocate a fresh, node for a particular path.
|
protected void |
releaseLock()
Release the read-write lock.
|
protected void |
removeRegistration(RegistrationTreeNode<T> node,
T registration)
Remove a registration from a particular node.
|
protected void |
takeLock()
Acquire the read-write lock.
|
RegistrationTreeSnapshot<T> |
takeSnapshot()
Obtain a tree snapshot.
|
protected final void takeLock()
findNodeFor(Iterable)
.protected final void releaseLock()
findNodeFor(Iterable)
and modification of the returned node. Note that callers should do so in a finally block.@Nonnull protected final RegistrationTreeNode<T> findNodeFor(@Nonnull Iterable<org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument> path)
path
- Path to find a node forprotected final void addRegistration(@Nonnull RegistrationTreeNode<T> node, @Nonnull T registration)
findNodeFor(Iterable)
and the lock must still be held.node
- Tree noderegistration
- Registration instanceprotected final void removeRegistration(@Nonnull RegistrationTreeNode<T> node, @Nonnull T registration)
node
- Tree noderegistration
- Registration instance@Nonnull public final RegistrationTreeSnapshot<T> takeSnapshot()
Copyright © 2017 OpenDaylight. All rights reserved.