Package org.opendaylight.mdsal.dom.api
Interface DOMDataTreeWriteOperations
-
- All Known Subinterfaces:
DOMDataTreeReadWriteTransaction
,DOMDataTreeWriteTransaction
- All Known Implementing Classes:
ForwardingDOMDataReadWriteTransaction
,ForwardingDOMDataWriteTransaction
,ShardedDOMWriteTransactionAdapter
,TransactionChainWriteTransaction
public interface DOMDataTreeWriteOperations
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
delete(LogicalDatastoreType store, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier path)
Removes a piece of data from specified path.void
merge(LogicalDatastoreType store, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier path, org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?,?> data)
Merges a piece of data with the existing data at a specified path.void
put(LogicalDatastoreType store, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier path, org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?,?> data)
Stores a piece of data at the specified path.
-
-
-
Method Detail
-
put
void put(LogicalDatastoreType store, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier path, org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?,?> data)
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:
IllegalStateException
- if the transaction has already been submitted
-
merge
void merge(LogicalDatastoreType store, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier path, org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?,?> data)
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:
IllegalStateException
- if the transaction has already been submitted
-
delete
void delete(LogicalDatastoreType store, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier path)
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:
IllegalStateException
- if the transaction was committed or canceled.
-
-