public interface WriteTransaction extends AsyncWriteTransaction<org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?>,org.opendaylight.yangtools.yang.binding.DataObject>
For more information on usage and examples, please see the documentation in AsyncWriteTransaction
.
Modifier and Type | Field and Description |
---|---|
static boolean |
CREATE_MISSING_PARENTS
Flag value indicating that missing parents should be created.
|
static boolean |
FAIL_ON_MISSING_PARENTS
Flag value indicating that missing parents should cause an error.
|
SUBMIT_EXCEPTION_MAPPER
Modifier and Type | Method and Description |
---|---|
void |
delete(LogicalDatastoreType store,
org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> path)
Removes a piece of data from specified path.
|
<T extends org.opendaylight.yangtools.yang.binding.DataObject> |
merge(LogicalDatastoreType store,
org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path,
T data)
Merges a piece of data with the existing data at a specified path.
|
<T extends org.opendaylight.yangtools.yang.binding.DataObject> |
merge(LogicalDatastoreType store,
org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path,
T data,
boolean createMissingParents)
Merges a piece of data with the existing data at a specified path.
|
<T extends org.opendaylight.yangtools.yang.binding.DataObject> |
put(LogicalDatastoreType store,
org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path,
T data)
Stores a piece of data at the specified path.
|
<T extends org.opendaylight.yangtools.yang.binding.DataObject> |
put(LogicalDatastoreType store,
org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path,
T data,
boolean createMissingParents)
Stores a piece of data at the specified path.
|
cancel, commit, submit
getIdentifier
static final boolean CREATE_MISSING_PARENTS
static final boolean FAIL_ON_MISSING_PARENTS
<T extends org.opendaylight.yangtools.yang.binding.DataObject> void put(LogicalDatastoreType store, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path, T data)
This method does not automatically create missing parent nodes. It is equivalent to invoking
put(LogicalDatastoreType, InstanceIdentifier, DataObject, boolean)
with createMissingParents
set to false.
For more information on usage and examples, please see the documentation in AsyncWriteTransaction
.
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.controller.md.sal.common.api.data.LogicalDatastoreType, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T>, T)
instead.
store
- the logical data store which should be modifiedpath
- the data object pathdata
- the data object to be written to the specified pathIllegalStateException
- if the transaction has already been submitted<T extends org.opendaylight.yangtools.yang.binding.DataObject> void put(LogicalDatastoreType store, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path, T data, boolean createMissingParents)
For more information on usage and examples, please see the documentation
in AsyncWriteTransaction
.
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.controller.md.sal.common.api.data.LogicalDatastoreType, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T>, T)
instead.
Note: Using createMissingParents
with value true, may
introduce garbage in data store, or recreate nodes, which were deleted by
previous transaction.
store
- the logical data store which should be modifiedpath
- the data object pathdata
- the data object to be written to the specified pathcreateMissingParents
- if CREATE_MISSING_PARENTS
(true
), any missing
parent nodes will be automatically created using a merge
operation.IllegalStateException
- if the transaction has already been submitted<T extends org.opendaylight.yangtools.yang.binding.DataObject> void merge(LogicalDatastoreType store, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path, T data)
This method does not automatically create missing parent nodes. It is equivalent to invoking
merge(LogicalDatastoreType, InstanceIdentifier, DataObject, boolean)
with createMissingParents
set to false.
For more information on usage and examples, please see the documentation in AsyncWriteTransaction
.
If you require an explicit replace operation, use put(org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T>, T)
instead.
store
- the logical data store which should be modifiedpath
- the data object pathdata
- the data object to be merged to the specified pathIllegalStateException
- if the transaction has already been submitted<T extends org.opendaylight.yangtools.yang.binding.DataObject> void merge(LogicalDatastoreType store, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T> path, T data, boolean createMissingParents)
For more information on usage and examples, please see the documentation
in AsyncWriteTransaction
.
If you require an explicit replace operation, use put(org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T>, T)
instead.
store
- the logical data store which should be modifiedpath
- the data object pathdata
- the data object to be merged to the specified pathcreateMissingParents
- if CREATE_MISSING_PARENTS
(true
), any missing
parent nodes will be automatically created using a merge
operation.IllegalStateException
- if the transaction has already been submittedvoid delete(LogicalDatastoreType store, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?> path)
AsyncWriteTransaction
delete
in interface AsyncWriteTransaction<org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?>,org.opendaylight.yangtools.yang.binding.DataObject>
store
- Logical data store which should be modifiedpath
- Data object pathCopyright © 2019 OpenDaylight. All rights reserved.