@Beta public class ClientTransaction extends AbstractClientHandle<org.opendaylight.controller.cluster.databroker.actors.dds.AbstractProxyTransaction>
This interface is used by the world outside of the actor system and in the actor system it is manifested via
its client actor. That requires some state transfer with DistributedDataStoreClientBehavior
. In order to
reduce request latency, all messages are carbon-copied (and enqueued first) to the client actor.
It is internally composed of multiple RemoteProxyTransaction
s, each responsible for a component shard.
Implementation is quite a bit complex, and involves cooperation with AbstractClientHistory
for tracking
gaps in transaction identifiers seen by backends.
These gaps need to be accounted for in the transaction setup message sent to a particular backend, so it can verify that the requested transaction is in-sequence. This is critical in ensuring that transactions (which are independent entities from message queueing perspective) do not get reodered -- thus allowing multiple in-flight transactions.
Alternative would be to force visibility by sending an abort request to all potential backends, but that would mean that even empty transactions increase load on all shards -- which would be a scalability issue.
Yet another alternative would be to introduce inter-transaction dependencies to the queueing layer in client actor, but that would require additional indirection and complexity.
Modifier and Type | Method and Description |
---|---|
void |
delete(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier path) |
com.google.common.util.concurrent.FluentFuture<Boolean> |
exists(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier path) |
void |
merge(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier path,
org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?,?> data) |
org.opendaylight.mdsal.dom.api.DOMDataTreeWriteCursor |
openCursor() |
com.google.common.util.concurrent.FluentFuture<Optional<org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?,?>>> |
read(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier path) |
org.opendaylight.mdsal.dom.spi.store.DOMStoreThreePhaseCommitCohort |
ready() |
void |
write(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier path,
org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?,?> data) |
abort, getIdentifier, toString
public org.opendaylight.mdsal.dom.api.DOMDataTreeWriteCursor openCursor()
public com.google.common.util.concurrent.FluentFuture<Boolean> exists(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier path)
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)
public void delete(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier path)
public void merge(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier path, org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?,?> data)
public void write(org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier path, org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode<?,?> data)
public org.opendaylight.mdsal.dom.spi.store.DOMStoreThreePhaseCommitCohort ready()
Copyright © 2019 OpenDaylight. All rights reserved.