T - transaction identifier type@Beta public abstract class AbstractSnapshotBackedTransactionChain<T> extends SnapshotBackedWriteTransaction.TransactionReadyPrototype<T> implements DOMStoreTransactionChain
DOMStoreTransactionChain
 interface relying on DataTreeSnapshot supplier
 and backend commit coordinator.| Modifier | Constructor and Description | 
|---|---|
protected  | 
AbstractSnapshotBackedTransactionChain()  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
close()
Closes Transaction Chain. 
 | 
protected abstract DOMStoreThreePhaseCommitCohort | 
createCohort(SnapshotBackedWriteTransaction<T> transaction,
            org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModification modification)
Create a cohort for driving the transaction through the commit process. 
 | 
protected abstract boolean | 
getDebugTransactions()
Inquire as to whether transactions should record their allocation context. 
 | 
DOMStoreReadTransaction | 
newReadOnlyTransaction()
Create a new read only transaction which will continue the chain. 
 | 
protected DOMStoreReadTransaction | 
newReadOnlyTransaction(T transactionId)  | 
DOMStoreReadWriteTransaction | 
newReadWriteTransaction()
Create a new read write transaction which will continue the chain. 
 | 
protected DOMStoreReadWriteTransaction | 
newReadWriteTransaction(T transactionId)  | 
DOMStoreWriteTransaction | 
newWriteOnlyTransaction()
Create a new write-only transaction which will continue the chain. 
 | 
protected DOMStoreWriteTransaction | 
newWriteOnlyTransaction(T transactionId)  | 
protected abstract T | 
nextTransactionIdentifier()
Return the next transaction identifier. 
 | 
protected void | 
onTransactionCommited(SnapshotBackedWriteTransaction<T> transaction)
Notify the base logic that a previously-submitted transaction has been committed successfully. 
 | 
protected void | 
onTransactionFailed(SnapshotBackedWriteTransaction<T> transaction,
                   Throwable cause)
Notify the base logic that a previously-submitted transaction has failed. 
 | 
protected abstract org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeSnapshot | 
takeSnapshot()
Take a fresh  
DataTreeSnapshot from the backend. | 
protected void | 
transactionAborted(SnapshotBackedWriteTransaction<T> tx)
Called when a transaction is closed without being readied. 
 | 
protected DOMStoreThreePhaseCommitCohort | 
transactionReady(SnapshotBackedWriteTransaction<T> tx,
                org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModification tree)
Returns a commit coordinator associated with supplied transactions. 
 | 
protected AbstractSnapshotBackedTransactionChain()
public final DOMStoreReadTransaction newReadOnlyTransaction()
DOMStoreTransactionChainDOMStoreTransactionFactory.newReadOnlyTransaction()
 and contains merged result of previous one and current state of data store.
 Otherwise read-only transaction presents isolated view as if previous read-write
 transaction was successful. State which was introduced by other transactions
 outside this transaction chain after creation of previous transaction is not visible.newReadOnlyTransaction in interface DOMStoreTransactionChainnewReadOnlyTransaction in interface DOMStoreTransactionFactoryprotected DOMStoreReadTransaction newReadOnlyTransaction(T transactionId)
public final DOMStoreReadWriteTransaction newReadWriteTransaction()
DOMStoreTransactionChain
 If previous write transaction was already commited to data store, new
 read-write transaction is same as obtained via DOMStoreTransactionFactory.newReadWriteTransaction()
 and contains merged result of previous one and current state of data store.
 
Otherwise read-write transaction presents isolated view as if previous read-write transaction was successful. State which was introduced by other transactions outside this transaction chain after creation of previous transaction is not visible.
newReadWriteTransaction in interface DOMStoreTransactionChainnewReadWriteTransaction in interface DOMStoreTransactionFactoryprotected DOMStoreReadWriteTransaction newReadWriteTransaction(T transactionId)
public final DOMStoreWriteTransaction newWriteOnlyTransaction()
DOMStoreTransactionChainnewWriteOnlyTransaction in interface DOMStoreTransactionChainnewWriteOnlyTransaction in interface DOMStoreTransactionFactoryprotected DOMStoreWriteTransaction newWriteOnlyTransaction(T transactionId)
protected final void transactionAborted(SnapshotBackedWriteTransaction<T> tx)
SnapshotBackedWriteTransaction.TransactionReadyPrototypetransactionAborted in class SnapshotBackedWriteTransaction.TransactionReadyPrototype<T>tx - Transaction which got aborted.protected final DOMStoreThreePhaseCommitCohort transactionReady(SnapshotBackedWriteTransaction<T> tx, org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModification tree)
SnapshotBackedWriteTransaction.TransactionReadyPrototypetransactionReady in class SnapshotBackedWriteTransaction.TransactionReadyPrototype<T>tx - Transaction on which ready was invoked.tree - Modified data tree which has been constructed.public final void close()
DOMStoreTransactionChainClose method of transaction chain does not guarantee that last alocated transaction is ready or was submitted.
close in interface AutoCloseableclose in interface DOMStoreTransactionChainprotected final void onTransactionCommited(SnapshotBackedWriteTransaction<T> transaction)
transaction - Transaction which completed successfully.protected final void onTransactionFailed(SnapshotBackedWriteTransaction<T> transaction, Throwable cause)
transaction - Transaction which failed.cause - Failure causeprotected abstract T nextTransactionIdentifier()
protected abstract boolean getDebugTransactions()
protected abstract org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeSnapshot takeSnapshot()
DataTreeSnapshot from the backend.protected abstract DOMStoreThreePhaseCommitCohort createCohort(SnapshotBackedWriteTransaction<T> transaction, org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModification modification)
transaction - Transaction handlemodification - DataTreeModification which needs to be applied to the backendDOMStoreThreePhaseCommitCohort cohort.Copyright © 2018 OpenDaylight. All rights reserved.