Interface WriteTransaction
-
- All Superinterfaces:
AsyncTransaction<InstanceIdentifier<?>,DataObject>
,AsyncWriteTransaction<InstanceIdentifier<?>,DataObject>
,Identifiable<Object>
- All Known Subinterfaces:
ReadWriteTransaction
- All Known Implementing Classes:
ForwardingReadWriteTransaction
,ForwardingWriteTransaction
@Deprecated(forRemoval=true) public interface WriteTransaction extends AsyncWriteTransaction<InstanceIdentifier<?>,DataObject>
Deprecated, for removal: This API element is subject to removal in a future version.UseWriteTransaction
instead.A transaction that provides mutation capabilities on a data tree.For more information on usage and examples, please see the documentation in
AsyncWriteTransaction
.
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
CREATE_MISSING_PARENTS
Deprecated, for removal: This API element is subject to removal in a future version.Flag value indicating that missing parents should be created.static boolean
FAIL_ON_MISSING_PARENTS
Deprecated, for removal: This API element is subject to removal in a future version.Flag value indicating that missing parents should cause an error.-
Fields inherited from interface org.opendaylight.controller.md.sal.common.api.data.AsyncWriteTransaction
SUBMIT_EXCEPTION_MAPPER
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
delete(LogicalDatastoreType store, InstanceIdentifier<?> path)
Deprecated, for removal: This API element is subject to removal in a future version.Removes a piece of data from specified path.<T extends DataObject>
voidmerge(LogicalDatastoreType store, InstanceIdentifier<T> path, T data)
Deprecated, for removal: This API element is subject to removal in a future version.Merges a piece of data with the existing data at a specified path.<T extends DataObject>
voidmerge(LogicalDatastoreType store, InstanceIdentifier<T> path, T data, boolean createMissingParents)
Deprecated, for removal: This API element is subject to removal in a future version.Merges a piece of data with the existing data at a specified path.<T extends DataObject>
voidput(LogicalDatastoreType store, InstanceIdentifier<T> path, T data)
Deprecated, for removal: This API element is subject to removal in a future version.Stores a piece of data at the specified path.<T extends DataObject>
voidput(LogicalDatastoreType store, InstanceIdentifier<T> path, T data, boolean createMissingParents)
Deprecated, for removal: This API element is subject to removal in a future version.Stores a piece of data at the specified path.-
Methods inherited from interface org.opendaylight.controller.md.sal.common.api.data.AsyncTransaction
getIdentifier
-
Methods inherited from interface org.opendaylight.controller.md.sal.common.api.data.AsyncWriteTransaction
cancel, commit, submit
-
-
-
-
Field Detail
-
CREATE_MISSING_PARENTS
static final boolean CREATE_MISSING_PARENTS
Deprecated, for removal: This API element is subject to removal in a future version.Flag value indicating that missing parents should be created.- See Also:
- Constant Field Values
-
FAIL_ON_MISSING_PARENTS
static final boolean FAIL_ON_MISSING_PARENTS
Deprecated, for removal: This API element is subject to removal in a future version.Flag value indicating that missing parents should cause an error.- See Also:
- Constant Field Values
-
-
Method Detail
-
put
<T extends DataObject> void put(LogicalDatastoreType store, InstanceIdentifier<T> path, T data)
Deprecated, for removal: This API element is subject to removal in a future version.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.This method does not automatically create missing parent nodes. It is equivalent to invoking
put(LogicalDatastoreType, InstanceIdentifier, DataObject, boolean)
withcreateMissingParents
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.- 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
-
put
<T extends DataObject> void put(LogicalDatastoreType store, InstanceIdentifier<T> path, T data, boolean createMissingParents)
Deprecated, for removal: This API element is subject to removal in a future version.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.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.- Parameters:
store
- the logical data store which should be modifiedpath
- the data object pathdata
- the data object to be written to the specified pathcreateMissingParents
- ifCREATE_MISSING_PARENTS
(true
), any missing parent nodes will be automatically created using a merge operation.- Throws:
IllegalStateException
- if the transaction has already been submitted
-
merge
<T extends DataObject> void merge(LogicalDatastoreType store, InstanceIdentifier<T> path, T data)
Deprecated, for removal: This API element is subject to removal in a future version.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.This method does not automatically create missing parent nodes. It is equivalent to invoking
merge(LogicalDatastoreType, InstanceIdentifier, DataObject, boolean)
withcreateMissingParents
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.- 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
-
merge
<T extends DataObject> void merge(LogicalDatastoreType store, InstanceIdentifier<T> path, T data, boolean createMissingParents)
Deprecated, for removal: This API element is subject to removal in a future version.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.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.- Parameters:
store
- the logical data store which should be modifiedpath
- the data object pathdata
- the data object to be merged to the specified pathcreateMissingParents
- ifCREATE_MISSING_PARENTS
(true
), any missing parent nodes will be automatically created using a merge operation.- Throws:
IllegalStateException
- if the transaction has already been submitted
-
delete
void delete(LogicalDatastoreType store, InstanceIdentifier<?> path)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:AsyncWriteTransaction
Removes a piece of data from specified path. This operation does not fail if the specified path does not exist.- Specified by:
delete
in interfaceAsyncWriteTransaction<InstanceIdentifier<?>,DataObject>
- Parameters:
store
- Logical data store which should be modifiedpath
- Data object path
-
-