P
- Type of path (subtree identifier), which represents location in
treeD
- Type of data (payload), which represents data payloadpublic interface AsyncDataChangeEvent<P extends org.opendaylight.yangtools.concepts.Path<P>,D>
extends org.opendaylight.yangtools.concepts.Immutable
Represents a notification indicating that some data at or under a particular
path has changed. The notification contains a capture of the changes in the data
subtree. This event is triggered by successful application of modifications
from a transaction on the global data tree. Use the
AsyncDataBroker.registerDataChangeListener(LogicalDatastoreType, Path, AsyncDataChangeListener, AsyncDataBroker.DataChangeScope)
method to register a listener for data change events.
A listener will only receive notifications for changes to data under the path
they register for. See
AsyncDataBroker.registerDataChangeListener(LogicalDatastoreType, Path, AsyncDataChangeListener, AsyncDataBroker.DataChangeScope)
to learn more about registration scopes.
The entire subtree under the path will be provided via instance methods of Data Change Event even if just a leaf node changes.
Implementation Note: This interface is not intended to be implemented by users of MD-SAL, but only to be consumed by them.
Modifier and Type | Method and Description |
---|---|
Map<P,D> |
getCreatedData()
Returns a map of paths and newly created objects, which were introduced by
this change into conceptual data tree, if no new objects were introduced
this map will be empty.
|
Map<P,D> |
getOriginalData()
Returns an immutable map of updated or removed paths and their original
states prior to this change.
|
D |
getOriginalSubtree()
Returns an immutable stable view of data state, which captures the state of
data store before the reported change.
|
Set<P> |
getRemovedPaths()
Returns an immutable set of removed paths.
|
Map<P,D> |
getUpdatedData()
Returns a map of paths and objects which were updated by this change in the
conceptual data tree if no existing objects were updated
this map will be empty.
|
D |
getUpdatedSubtree()
Returns an immutable stable view of data, which captures the state of data
store after the reported change.
|
Map<P,D> getCreatedData()
This map contains all data tree nodes (and paths to them) which were created and are in the scope of listener registration. The data tree nodes contain their whole subtree with their current state.
Map<P,D> getUpdatedData()
This map contains all data tree nodes (and paths to them) which were updated and are in the scope of listener registration. The data tree nodes contain their whole subtree with their current state.
A Node is considered updated if it contents were replaced or one of its children was created, removed or updated.
Original state of the updated data tree nodes is in
getOriginalData()
stored with same path.
Set<P> getRemovedPaths()
This set contains the paths to the data tree nodes which are in the scope of the listener registration that have been removed.
Original state of the removed data tree nodes is in
getOriginalData()
stored with same path.
Map<P,D> getOriginalData()
This map contains the original version of the data tree nodes (and paths to them), which are in the scope of the listener registration.
D getOriginalSubtree()
The view is rooted at the point where the listener, to which the event is being delivered, was registered.
If listener used a wildcarded path (if supported by path type) during
registration for change listeners this method returns null, and original
state can be accessed only via getOriginalData()
D getUpdatedSubtree()
The view is rooted at the point where the listener, to which the event is being delivered, was registered.
If listener used a wildcarded path (if supported by path type) during
registration for change listeners this method returns null, and state
can be accessed only via getCreatedData()
,
getUpdatedData()
, getRemovedPaths()
Copyright © 2019 OpenDaylight. All rights reserved.