@Beta public interface CursorAwareWriteTransaction extends DataTreeCursorProvider
Modifier and Type | Method and Description |
---|---|
boolean |
cancel()
Cancels the transaction.
|
<T extends TreeNode> |
createCursor(DataTreeIdentifier<T> path)
Create a
DataTreeWriteCursor anchored at the specified path. |
<T extends TreeNode> |
submit(BiConsumer<TransactionCommitFailedException,T> callback)
Submits this transaction to be asynchronously applied to update the logical data tree.
|
@Nullable <T extends TreeNode> DataTreeCursor createCursor(@Nonnull DataTreeIdentifier<T> path)
DataTreeWriteCursor
anchored at the specified path.
There can only be one cursor open at a time.
createCursor
in interface DataTreeCursorProvider
T
- data tree typepath
- Path at which the cursor is to be anchoredIllegalStateException
- when there's an open cursor, or this transaction is closed already.boolean cancel()
Transactions can only be cancelled if it was not yet submited.
Invoking cancel() on failed or already canceled will have no effect, and transaction is considered cancelled.
Invoking cancel() on finished transaction (future returned by submit(BiConsumer)
already
successfully completed) will always fail (return false).
<T extends TreeNode> void submit(BiConsumer<TransactionCommitFailedException,T> callback)
This call logically seals the transaction, which prevents the client from further changing
data tree using this transaction's cursor. Any subsequent calls to
createCursorCursor(DOMDataTreeIdentifier
or any of the cursor's methods will fail with IllegalStateException
.
The transaction is marked as submitted and enqueued into the shard back-end for processing.
T
- result typecallback
- result callbackCopyright © 2019 OpenDaylight. All rights reserved.