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(@NonNull RegistrationTreeNode<T> node,
T registration)
Add a registration to a particular node.
|
protected @NonNull RegistrationTreeNode<T> |
findNodeFor(@NonNull 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(@NonNull RegistrationTreeNode<T> node,
T registration)
Remove a registration from a particular node.
|
protected void |
takeLock()
Acquire the read-write lock.
|
@NonNull RegistrationTreeSnapshot<T> |
takeSnapshot()
Obtain a tree snapshot.
|
protected final void takeLock()
findNodeFor(Iterable)
. This method
must not be called when the lock is already held by this thread.protected final void releaseLock()
findNodeFor(Iterable)
and modification of the returned node. Note that callers should do so in a finally block.protected final @NonNull 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, T registration)
findNodeFor(Iterable)
and the lock must still be held.node
- Tree noderegistration
- Registration instanceprotected final void removeRegistration(@NonNull RegistrationTreeNode<T> node, T registration)
node
- Tree noderegistration
- Registration instancepublic final @NonNull RegistrationTreeSnapshot<T> takeSnapshot()
Copyright © 2019 OpenDaylight. All rights reserved.