public static enum AsyncDataBroker.DataChangeScope extends Enum<AsyncDataBroker.DataChangeScope>
Represents scope of data change (addition, replacement, deletion). The terminology for scope types is reused from LDAP.
container a // scope BASE, ONE, SUBTREE leaf "foo" // scope ONE, SUBTREE container // scope ONE, SUBTREE leaf "bar" // scope SUBTREE list list // scope ONE, SUBTREE list [a] // scope SUBTREE id "a" // scope SUBTREE list [b] // scope SUBTREE id "b" // scope SUBTREEFollowing is an example model with comments describing what notifications you would receive based on the scope you specify, when you are registering for changes on list list (without specifying concrete item in the list).
list list // scope BASE, ONE, SUBTREE list [a] // scope ONE, SUBTREE id "a" // scope SUBTREE list [b] // scope ONE, SUBTREE id "b" // scope SUBTREE
Enum Constant and Description |
---|
BASE
Represents only a direct change of the node, such as replacement of a node, addition or
deletion.
|
ONE
Represent a change (addition,replacement,deletion) of the node or one of its direct
children.
|
SUBTREE
Represents a change of the node or any of or any of its child nodes,
direct and nested.
|
Modifier and Type | Method and Description |
---|---|
static AsyncDataBroker.DataChangeScope |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static AsyncDataBroker.DataChangeScope[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final AsyncDataBroker.DataChangeScope BASE
ONE
, this may have counterintuitive
interactions when viewed from a binding aware application, in particular when it
pertains to lists.public static final AsyncDataBroker.DataChangeScope ONE
Note that this is done in the binding independent data tree and so the behavior
might be counterintuitive when used with binding aware interfaces particularly
when it comes to lists. The list itself is a node in the binding independent tree,
which means that if you want to listen on new elements you must listen on the list itself
with the scope of ONE
.
As an example, in the below YANG snippet, listening on node with scope
ONE
would tell you if the node-connector list was created or deleted,
but not when elements were added or removed from the list assuming the list itself
already existed.
container nodes { list node { key "id"; leaf id { type string; } list node-connector { leaf id { type string; } } } }This scope is superset of
BASE
.public static final AsyncDataBroker.DataChangeScope SUBTREE
public static AsyncDataBroker.DataChangeScope[] values()
for (AsyncDataBroker.DataChangeScope c : AsyncDataBroker.DataChangeScope.values()) System.out.println(c);
public static AsyncDataBroker.DataChangeScope valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2019 OpenDaylight. All rights reserved.