public interface WriteOperations
WriteTransaction
and ReadWriteTransaction
. This interface defines
the operations without a tie-in with lifecycle management.Modifier and Type | Field and Description |
---|---|
static boolean |
CREATE_MISSING_PARENTS
Deprecated.
|
static boolean |
FAIL_ON_MISSING_PARENTS
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
delete(@NonNull LogicalDatastoreType store,
@NonNull InstanceIdentifier<?> path)
Removes a piece of data from specified path.
|
<T extends DataObject> |
merge(@NonNull LogicalDatastoreType store,
@NonNull InstanceIdentifier<T> path,
T data)
Merges a piece of data with the existing data at a specified path.
|
<T extends DataObject> |
merge(@NonNull LogicalDatastoreType store,
@NonNull InstanceIdentifier<T> path,
T data,
boolean createMissingParents)
|
default <T extends DataObject> |
mergeParentStructureMerge(@NonNull LogicalDatastoreType store,
@NonNull InstanceIdentifier<T> path,
T data)
Merges a piece of data with the existing data at a specified path.
|
default <T extends DataObject> |
mergeParentStructurePut(@NonNull LogicalDatastoreType store,
@NonNull InstanceIdentifier<T> path,
T data)
Stores a piece of data at the specified path.
|
<T extends DataObject> |
put(@NonNull LogicalDatastoreType store,
@NonNull InstanceIdentifier<T> path,
T data)
Stores a piece of data at the specified path.
|
<T extends DataObject> |
put(@NonNull LogicalDatastoreType store,
@NonNull InstanceIdentifier<T> path,
T data,
boolean createMissingParents)
|
@Deprecated static final boolean CREATE_MISSING_PARENTS
merge(LogicalDatastoreType, InstanceIdentifier, DataObject, boolean)
and put(LogicalDatastoreType, InstanceIdentifier, DataObject, boolean)
.
WARNING: Using this flag may introduce garbage in data store, or recreate nodes, which were deleted by
a previous transaction. It is not necessary in most scenarios and also has a significantly higher
cost than FAIL_ON_MISSING_PARENTS
and should only be used when absolutely necessary.
@Deprecated static final boolean FAIL_ON_MISSING_PARENTS
merge(LogicalDatastoreType, InstanceIdentifier, DataObject, boolean)
and put(LogicalDatastoreType, InstanceIdentifier, DataObject, boolean)
.<T extends DataObject> void put(@NonNull LogicalDatastoreType store, @NonNull InstanceIdentifier<T> path, T 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.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 submittedNullPointerException
- if any of the arguments is null@Deprecated <T extends DataObject> void put(@NonNull LogicalDatastoreType store, @NonNull InstanceIdentifier<T> path, T data, boolean createMissingParents)
put(LogicalDatastoreType, InstanceIdentifier, DataObject)
or
mergeParentStructurePut(LogicalDatastoreType, InstanceIdentifier, DataObject)
instead.
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.
WARNING: Using this method may introduce garbage in data store, or recreate nodes, which were deleted by
a previous transaction. It is not necessary in most scenarios and has a significantly higher cost
than put(LogicalDatastoreType, InstanceIdentifier, DataObject)
and should only be used
when absolutely necessary.
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. WARNING: using this option is not needed
in most scenarios and has a significant performance cost and should be avoided
whenever possible.IllegalStateException
- if the transaction has already been submittedNullPointerException
- if any of the arguments is null@Beta default <T extends DataObject> void mergeParentStructurePut(@NonNull LogicalDatastoreType store, @NonNull InstanceIdentifier<T> path, T data)
put(LogicalDatastoreType, InstanceIdentifier, DataObject)
, this method will attempt to create
semantically-significant parent nodes, like list entries and presence containers, as indicated by path
.
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.
WARNING: Using this method may introduce garbage in data store, or recreate nodes, which were deleted by
a previous transaction. It also has a significantly higher cost than
put(LogicalDatastoreType, InstanceIdentifier, DataObject)
and should only be used when
absolutely necessary.
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 submittedNullPointerException
- if any of the arguments is null<T extends DataObject> void merge(@NonNull LogicalDatastoreType store, @NonNull InstanceIdentifier<T> path, T data)
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 submittedNullPointerException
- if any of the arguments is null@Deprecated <T extends DataObject> void merge(@NonNull LogicalDatastoreType store, @NonNull InstanceIdentifier<T> path, T data, boolean createMissingParents)
merge(LogicalDatastoreType, InstanceIdentifier, DataObject)
or
mergeParentStructureMerge(LogicalDatastoreType, InstanceIdentifier, DataObject)
instead.
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. WARNING: using this option is not needed
in most scenarios and has a significant performance cost and should be avoided
whenever possible.IllegalStateException
- if the transaction has already been submittedNullPointerException
- if any of the arguments is null@Beta default <T extends DataObject> void mergeParentStructureMerge(@NonNull LogicalDatastoreType store, @NonNull InstanceIdentifier<T> path, T data)
merge(LogicalDatastoreType, InstanceIdentifier, DataObject)
, this method will attempt to create
semantically-significant parent nodes, like list entries and presence containers, as indicated by path
.
If you require an explicit replace operation, use put(org.opendaylight.mdsal.common.api.LogicalDatastoreType, org.opendaylight.yangtools.yang.binding.InstanceIdentifier<T>, T)
instead.
WARNING: Using this method may introduce garbage in data store, or recreate nodes, which were deleted by
a previous transaction. It is not necessary in most scenarios and has a significantly higher cost
than merge(LogicalDatastoreType, InstanceIdentifier, DataObject)
. It should only be used
when absolutely necessary.
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 submittedNullPointerException
- if any of the arguments is nullvoid delete(@NonNull LogicalDatastoreType store, @NonNull InstanceIdentifier<?> path)
store
- Logical data store which should be modifiedpath
- Data object pathIllegalStateException
- if the transaction was committed or canceled.Copyright © 2019 OpenDaylight. All rights reserved.