T
- identifier type@Beta public final class SnapshotBackedReadTransaction<T> extends AbstractDOMStoreTransaction<T> implements DOMStoreReadTransaction, SnapshotBackedTransaction
DataTreeSnapshot
which delegates most
of its calls to similar methods provided by underlying snapshot.Modifier and Type | Method and Description |
---|---|
void |
close() |
com.google.common.util.concurrent.FluentFuture<Boolean> |
exists(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier path)
Checks if data is available in the logical data store located at provided path.
|
Optional<org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeSnapshot> |
getSnapshot()
Returns the
DataTreeSnapshot underlying this transaction. |
com.google.common.util.concurrent.FluentFuture<Optional<org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?,?>>> |
read(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier path)
Reads data from provided logical data store located at provided path.
|
addToStringAttributes, getDebugContext, getIdentifier, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getIdentifier
public void close()
close
in interface AutoCloseable
close
in interface DOMStoreTransaction
public com.google.common.util.concurrent.FluentFuture<Optional<org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?,?>>> read(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier path)
DOMStoreReadTransaction
read
in interface DOMStoreReadTransaction
path
- Path which uniquely identifies subtree which client want to
readReadFailedException
or an exception derived from ReadFailedException.public com.google.common.util.concurrent.FluentFuture<Boolean> exists(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier path)
DOMStoreReadTransaction
Note: a successful result from this method makes no guarantee that a subsequent call to DOMStoreReadTransaction.read(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 DOMStoreReadTransaction
path
- Path which uniquely identifies subtree which client want to
check existence ofReadFailedException
or an exception derived from ReadFailedException.public Optional<org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeSnapshot> getSnapshot()
SnapshotBackedTransaction
DataTreeSnapshot
underlying this transaction. If this transaction is no longer open,
Optional.empty()
is returned.getSnapshot
in interface SnapshotBackedTransaction
Copyright © 2019 OpenDaylight. All rights reserved.