Class ForwardingDOMDataReadWriteTransaction
- java.lang.Object
-
- com.google.common.collect.ForwardingObject
-
- org.opendaylight.controller.md.sal.dom.spi.ForwardingDOMDataReadWriteTransaction
-
- All Implemented Interfaces:
AsyncReadTransaction<YangInstanceIdentifier,NormalizedNode<?,?>>
,AsyncReadWriteTransaction<YangInstanceIdentifier,NormalizedNode<?,?>>
,AsyncTransaction<YangInstanceIdentifier,NormalizedNode<?,?>>
,AsyncWriteTransaction<YangInstanceIdentifier,NormalizedNode<?,?>>
,DOMDataReadTransaction
,DOMDataReadWriteTransaction
,DOMDataWriteTransaction
,Identifiable<Object>
@Deprecated(forRemoval=true) public abstract class ForwardingDOMDataReadWriteTransaction extends ForwardingObject implements DOMDataReadWriteTransaction
Deprecated, for removal: This API element is subject to removal in a future version.UseForwardingDOMDataReadWriteTransaction
instead.UtilityDOMDataReadWriteTransaction
implementation which forwards all interface method invocation to a delegate instance.
-
-
Field Summary
-
Fields inherited from interface org.opendaylight.controller.md.sal.common.api.data.AsyncWriteTransaction
SUBMIT_EXCEPTION_MAPPER
-
-
Constructor Summary
Constructors Constructor Description ForwardingDOMDataReadWriteTransaction()
Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
cancel()
Deprecated, for removal: This API element is subject to removal in a future version.Cancels the transaction.FluentFuture<? extends CommitInfo>
commit()
Deprecated, for removal: This API element is subject to removal in a future version.Submits this transaction to be asynchronously applied to update the logical data tree.protected abstract @NonNull DOMDataReadWriteTransaction
delegate()
Deprecated, for removal: This API element is subject to removal in a future version.void
delete(LogicalDatastoreType store, YangInstanceIdentifier path)
Deprecated, for removal: This API element is subject to removal in a future version.Removes a piece of data from specified path.CheckedFuture<Boolean,ReadFailedException>
exists(LogicalDatastoreType store, YangInstanceIdentifier path)
Deprecated, for removal: This API element is subject to removal in a future version.Checks if data is available in the logical data store located at provided path.Object
getIdentifier()
Deprecated, for removal: This API element is subject to removal in a future version.void
merge(LogicalDatastoreType store, YangInstanceIdentifier path, NormalizedNode<?,?> 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.void
put(LogicalDatastoreType store, YangInstanceIdentifier path, NormalizedNode<?,?> data)
Deprecated, for removal: This API element is subject to removal in a future version.Stores a piece of data at the specified path.CheckedFuture<Optional<NormalizedNode<?,?>>,ReadFailedException>
read(LogicalDatastoreType store, YangInstanceIdentifier path)
Deprecated, for removal: This API element is subject to removal in a future version.Reads data from provided logical data store located at the provided path.-
Methods inherited from class com.google.common.collect.ForwardingObject
toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.opendaylight.controller.md.sal.common.api.data.AsyncWriteTransaction
submit
-
-
-
-
Method Detail
-
delegate
protected abstract @NonNull DOMDataReadWriteTransaction delegate()
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
delegate
in classForwardingObject
-
read
public CheckedFuture<Optional<NormalizedNode<?,?>>,ReadFailedException> read(LogicalDatastoreType store, YangInstanceIdentifier path)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:DOMDataReadTransaction
Reads data from provided logical data store located at the provided path.If the target is a subtree, then the whole subtree is read (and will be accessible from the returned data object).
- Specified by:
read
in interfaceDOMDataReadTransaction
- Parameters:
store
- Logical data store from which read should occur.path
- Path which uniquely identifies subtree which client want to read- Returns:
- a CheckFuture containing the result of the read. The Future blocks until the
commit operation is complete. Once complete:
- If the data at the supplied path exists, the Future returns an Optional object containing the data.
- If the data at the supplied path does not exist, the Future returns Optional#absent().
- If the read of the data fails, the Future will fail with a
ReadFailedException
or an exception derived from ReadFailedException.
-
exists
public CheckedFuture<Boolean,ReadFailedException> exists(LogicalDatastoreType store, YangInstanceIdentifier path)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:DOMDataReadTransaction
Checks if data is available in the logical data store located at provided path.Note: a successful result from this method makes no guarantee that a subsequent call to
DOMDataReadTransaction.read(org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier)
will succeed. It is possible that the data resides in a data store on a remote node and, if that node goes down or a network failure occurs, a subsequent read would fail. Another scenario is if the data is deleted in between the calls toexists
andread
- Specified by:
exists
in interfaceDOMDataReadTransaction
- Parameters:
store
- Logical data store from which read should occur.path
- Path which uniquely identifies subtree which client want to check existence of- Returns:
- a CheckFuture containing the result of the check.
- If the data at the supplied path exists, the Future returns a Boolean whose value is true, false otherwise
- If checking for the data fails, the Future will fail with a
ReadFailedException
or an exception derived from ReadFailedException.
-
getIdentifier
public Object getIdentifier()
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getIdentifier
in interfaceAsyncTransaction<YangInstanceIdentifier,NormalizedNode<?,?>>
- Specified by:
getIdentifier
in interfaceIdentifiable<Object>
-
put
public void put(LogicalDatastoreType store, YangInstanceIdentifier path, NormalizedNode<?,?> data)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:DOMDataWriteTransaction
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
DOMDataWriteTransaction.merge(org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier, org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?, ?>)
instead.- Specified by:
put
in interfaceDOMDataWriteTransaction
- Parameters:
store
- the logical data store which should be modifiedpath
- the data object pathdata
- the data object to be written to the specified path
-
merge
public void merge(LogicalDatastoreType store, YangInstanceIdentifier path, NormalizedNode<?,?> data)
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:DOMDataWriteTransaction
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
DOMDataWriteTransaction.put(org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier, org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?, ?>)
instead.- Specified by:
merge
in interfaceDOMDataWriteTransaction
- Parameters:
store
- the logical data store which should be modifiedpath
- the data object pathdata
- the data object to be merged to the specified path
-
cancel
public boolean cancel()
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:AsyncWriteTransaction
Cancels the transaction.Transactions can only be cancelled if it's state is new or submitted.
Invoking cancel() on a failed or cancelled transaction will have no effect, and transaction is considered cancelled.
Invoking cancel() on a finished transaction (future returned by
AsyncWriteTransaction.submit()
already completed will always fail (return false).- Specified by:
cancel
in interfaceAsyncWriteTransaction<YangInstanceIdentifier,NormalizedNode<?,?>>
- Returns:
false
if the task could not be cancelled, typically because it has already completed normallytrue
otherwise
-
delete
public void delete(LogicalDatastoreType store, YangInstanceIdentifier 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<YangInstanceIdentifier,NormalizedNode<?,?>>
- Specified by:
delete
in interfaceDOMDataWriteTransaction
- Parameters:
store
- Logical data store which should be modifiedpath
- Data object path
-
commit
public FluentFuture<? extends CommitInfo> commit()
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:AsyncWriteTransaction
Submits this transaction to be asynchronously applied to update the logical data tree. The returnedFluentFuture
conveys the result of applying the data changes.This call logically seals the transaction, which prevents the client from further changing the data tree using this transaction. Any subsequent calls to
put(LogicalDatastoreType, Path, Object)
,merge(LogicalDatastoreType, Path, Object)
,delete(LogicalDatastoreType, Path)
will fail withIllegalStateException
. The transaction is marked as submitted and enqueued into the data store back-end for processing.Whether or not the commit is successful is determined by versioning of the data tree and validation of registered commit participants if the transaction changes the data tree.
The effects of a successful commit of data depends on listeners and commit participants that are registered with the data broker.
A successful commit produces implementation-specific
CommitInfo
structure, which is used to communicate post-condition information to the caller. Such information can contain commit-id, timing information or any other information the implementation wishes to share.- Specified by:
commit
in interfaceAsyncWriteTransaction<YangInstanceIdentifier,NormalizedNode<?,?>>
- Returns:
- a FluentFuture containing the result of the commit information. The Future blocks until the commit
operation is complete. A successful commit returns nothing. On failure, the Future will fail with a
TransactionCommitFailedException
or an exception derived from TransactionCommitFailedException.
-
-