Package org.opendaylight.mdsal.dom.api
Interface DOMDataTreeWriteOperations
- All Known Subinterfaces:
DOMDataTreeQueryReadWriteTransaction
,DOMDataTreeReadWriteTransaction
,DOMDataTreeWriteTransaction
- All Known Implementing Classes:
ForwardingDOMDataReadWriteTransaction
,ForwardingDOMDataWriteTransaction
public interface DOMDataTreeWriteOperations
-
Method Summary
Modifier and TypeMethodDescriptionvoid
delete
(LogicalDatastoreType store, YangInstanceIdentifier path) Removes a piece of data from specified path.void
merge
(LogicalDatastoreType store, YangInstanceIdentifier path, NormalizedNode data) Merges a piece of data with the existing data at a specified path.void
put
(LogicalDatastoreType store, YangInstanceIdentifier path, NormalizedNode data) Stores a piece of data at the specified path.
-
Method Details
-
put
Stores a piece of data at the specified path. This acts as an add / replace operation, which is to say that whole subtree will be replaced by the specified data.If you need to make sure that a parent object exists but you do not want modify its pre-existing state by using put, consider using
merge(org.opendaylight.mdsal.common.api.LogicalDatastoreType, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier, org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode)
instead.- Parameters:
store
- the logical data store which should be modifiedpath
- the data object pathdata
- the data object to be written to the specified path- Throws:
IllegalArgumentException
- ifstore
is not supportedIllegalStateException
- if the transaction has already been submittedNullPointerException
- if any argument isnull
TransactionDatastoreMismatchException
- if this transaction is already bound to a different data store
-
merge
Merges a piece of data with the existing data at a specified path. Any pre-existing data which is not explicitly overwritten will be preserved. This means that if you store a container, its child lists will be merged.If you require an explicit replace operation, use
put(org.opendaylight.mdsal.common.api.LogicalDatastoreType, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier, org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode)
instead.- Parameters:
store
- the logical data store which should be modifiedpath
- the data object pathdata
- the data object to be merged to the specified path- Throws:
IllegalArgumentException
- ifstore
is not supportedIllegalStateException
- if the transaction has already been submittedNullPointerException
- if any argument isnull
TransactionDatastoreMismatchException
- if this transaction is already bound to a different data store
-
delete
Removes a piece of data from specified path. This operation does not fail if the specified path does not exist.- Parameters:
store
- Logical data store which should be modifiedpath
- Data object path- Throws:
IllegalArgumentException
- ifstore
is not supportedIllegalStateException
- if the transaction was committed or canceled.NullPointerException
- if any argument isnull
TransactionDatastoreMismatchException
- if this transaction is already bound to a different data store
-