public class DOMBrokerReadWriteTransaction extends AbstractDOMBrokerWriteTransaction<DOMStoreReadWriteTransaction> implements DOMDataReadWriteTransaction
Modifier | Constructor and Description |
---|---|
protected |
DOMBrokerReadWriteTransaction(Object identifier,
Map<LogicalDatastoreType,? extends DOMStoreTransactionFactory> storeTxFactories,
AbstractDOMTransactionFactory<?> commitImpl)
Constructs an instance.
|
Modifier and Type | Method and Description |
---|---|
protected DOMStoreReadWriteTransaction |
createTransaction(LogicalDatastoreType key) |
com.google.common.util.concurrent.CheckedFuture<Boolean,ReadFailedException> |
exists(LogicalDatastoreType store,
org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier path)
Checks if data is available in the logical data store located at provided path.
|
com.google.common.util.concurrent.CheckedFuture<com.google.common.base.Optional<org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?,?>>,ReadFailedException> |
read(LogicalDatastoreType store,
org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier path)
Reads data from provided logical data store located at the provided path.
|
addToStringAttributes, cancel, commit, delete, merge, put, submit
closeSubtransactions, getIdentifier, getSubtransaction, getSubtransactions, getTxFactory, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
delete, merge, put
cancel, commit, submit
getIdentifier
protected DOMBrokerReadWriteTransaction(Object identifier, Map<LogicalDatastoreType,? extends DOMStoreTransactionFactory> storeTxFactories, AbstractDOMTransactionFactory<?> commitImpl)
identifier
- identifier of transaction.storeTxFactories
- the backing transaction store factoriespublic com.google.common.util.concurrent.CheckedFuture<com.google.common.base.Optional<org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?,?>>,ReadFailedException> read(LogicalDatastoreType store, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier path)
DOMDataReadTransaction
If the target is a subtree, then the whole subtree is read (and will be accessible from the returned data object).
read
in interface DOMDataReadTransaction
store
- Logical data store from which read should occur.path
- Path which uniquely identifies subtree which client want to
readReadFailedException
or an exception derived from ReadFailedException.public com.google.common.util.concurrent.CheckedFuture<Boolean,ReadFailedException> exists(LogicalDatastoreType store, org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier path)
DOMDataReadTransaction
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 to exists
and read
exists
in interface DOMDataReadTransaction
store
- Logical data store from which read should occur.path
- Path which uniquely identifies subtree which client want to
check existence ofReadFailedException
or an exception derived from ReadFailedException.protected DOMStoreReadWriteTransaction createTransaction(LogicalDatastoreType key)
createTransaction
in class AbstractDOMBrokerTransaction<DOMStoreReadWriteTransaction>
Copyright © 2019 OpenDaylight. All rights reserved.