public final class SynchronizedDataTreeModification extends Object implements DataTreeModification
DataTreeModification
implementation which delegates all calls to
another instance, making sure no method is being invoked from multiple threads
concurrently.Modifier and Type | Method and Description |
---|---|
void |
applyToCursor(DataTreeModificationCursor cursor)
Apply the contents of this modification to a cursor.
|
static DataTreeModification |
create(DataTreeModification delegate) |
void |
delete(YangInstanceIdentifier path)
Delete the node at specified path.
|
SchemaContext |
getSchemaContext()
Return the current
SchemaContext , which is being used for operations. |
void |
merge(YangInstanceIdentifier path,
NormalizedNode<?,?> data)
Merge the specified data with the currently-present data
at specified path.
|
DataTreeModification |
newModification()
Create a new data tree modification based on this snapshot, using the
specified data application strategy.
|
Optional<NormalizedNode<?,?>> |
readNode(YangInstanceIdentifier path)
Read a particular node from the snapshot.
|
void |
ready()
Finish creation of a modification, making it ready for application
to the data tree.
|
void |
write(YangInstanceIdentifier path,
NormalizedNode<?,?> data)
Replace the data at specified path with supplied data.
|
public static DataTreeModification create(DataTreeModification delegate)
public Optional<NormalizedNode<?,?>> readNode(YangInstanceIdentifier path)
DataTreeSnapshot
readNode
in interface DataTreeSnapshot
path
- Path of the nodepublic DataTreeModification newModification()
DataTreeSnapshot
newModification
in interface DataTreeSnapshot
public void delete(YangInstanceIdentifier path)
DataTreeModification
delete
in interface DataTreeModification
path
- Node pathpublic void merge(YangInstanceIdentifier path, NormalizedNode<?,?> data)
DataTreeModification
merge
in interface DataTreeModification
path
- Node pathdata
- Data to be mergedpublic void write(YangInstanceIdentifier path, NormalizedNode<?,?> data)
DataTreeModification
write
in interface DataTreeModification
path
- Node pathdata
- New node datapublic void ready()
DataTreeModification
DataTreeModification.applyToCursor(DataTreeModificationCursor)
will result
in undefined behavior, possibly with an
IllegalStateException
being thrown.ready
in interface DataTreeModification
public void applyToCursor(@Nonnull DataTreeModificationCursor cursor)
DataTreeModification
applyToCursor
in interface DataTreeModification
cursor
- cursor to which this modificationpublic SchemaContext getSchemaContext()
DataTreeSnapshot
SchemaContext
, which is being used for operations.getSchemaContext
in interface DataTreeSnapshot
Copyright © 2019 OpenDaylight. All rights reserved.