public interface WriteTransaction extends AsyncWriteTransaction<InstanceIdentifier<?>,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.
|
Modifier and Type | Method and Description |
---|---|
void |
delete(LogicalDatastoreType store,
InstanceIdentifier<?> path)
Removes a piece of data from specified path.
|
<T extends DataObject> |
merge(LogicalDatastoreType store,
InstanceIdentifier<T> path,
T data)
Merges a piece of data with the existing data at a specified path.
|
<T extends DataObject> |
merge(LogicalDatastoreType store,
InstanceIdentifier<T> path,
T data,
boolean createMissingParents)
Merges a piece of data with the existing data at a specified path.
|
<T extends DataObject> |
put(LogicalDatastoreType store,
InstanceIdentifier<T> path,
T data)
Stores a piece of data at the specified path.
|
<T extends DataObject> |
put(LogicalDatastoreType store,
InstanceIdentifier<T> path,
T data,
boolean createMissingParents)
Stores a piece of data at the specified path.
|
cancel, commit
getIdentifier
static final boolean CREATE_MISSING_PARENTS
static final boolean FAIL_ON_MISSING_PARENTS
<T extends DataObject> void put(LogicalDatastoreType store, 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.mdsal.common.api.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 DataObject> void put(LogicalDatastoreType store, 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.mdsal.common.api.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
, any missing parent nodes will be automatically
created using a merge operation.IllegalStateException
- if the transaction has already been submitted<T extends DataObject> void merge(LogicalDatastoreType store, 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.mdsal.common.api.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 DataObject> void merge(LogicalDatastoreType store, 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.mdsal.common.api.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
, any missing parent nodes will be automatically created
using a merge operation.IllegalStateException
- if the transaction has already been submittedvoid delete(LogicalDatastoreType store, InstanceIdentifier<?> path)
AsyncWriteTransaction
delete
in interface AsyncWriteTransaction<InstanceIdentifier<?>,DataObject>
store
- Logical data store which should be modifiedpath
- Data object pathCopyright © 2019 OpenDaylight. All rights reserved.