Class RemoteTransactionContext
- java.lang.Object
-
- org.opendaylight.controller.cluster.datastore.RemoteTransactionContext
-
public class RemoteTransactionContext extends Object
Redirects front-end transaction operations to a shard for processing. Instances of this class are used when the destination shard is remote to the caller.- Author:
- Thomas Pantelis
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
RemoteTransactionContext(TransactionIdentifier identifier, ActorSelection actor, ActorUtils actorUtils, short remoteTransactionVersion, OperationLimiter limiter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
closeTransaction()
scala.concurrent.Future<Object>
directCommit(Boolean havePermit)
void
executeDelete(YangInstanceIdentifier path, Boolean havePermit)
void
executeMerge(YangInstanceIdentifier path, NormalizedNode data, Boolean havePermit)
<T> void
executeRead(AbstractRead<T> readCmd, SettableFuture<T> returnFuture, Boolean havePermit)
void
executeWrite(YangInstanceIdentifier path, NormalizedNode data, Boolean havePermit)
protected ActorUtils
getActorUtils()
protected @NonNull TransactionIdentifier
getIdentifier()
Get the transaction identifier associated with this context.short
getTransactionVersion()
protected void
incrementModificationCount()
protected boolean
isOperationHandOffComplete()
protected void
logModificationCount()
void
operationHandOffComplete()
scala.concurrent.Future<ActorSelection>
readyTransaction(Boolean havePermit, Optional<SortedSet<String>> participatingShardNames)
protected scala.concurrent.Future<Object>
sendBatchedModifications()
protected scala.concurrent.Future<Object>
sendBatchedModifications(boolean ready, boolean doCommitOnReady, Optional<SortedSet<String>> participatingShardNames)
protected scala.concurrent.Future<ActorSelection>
transformReadyReply(scala.concurrent.Future<Object> readyReplyFuture)
boolean
usesOperationLimiting()
-
-
-
Constructor Detail
-
RemoteTransactionContext
protected RemoteTransactionContext(TransactionIdentifier identifier, ActorSelection actor, ActorUtils actorUtils, short remoteTransactionVersion, OperationLimiter limiter)
-
-
Method Detail
-
getActorUtils
protected ActorUtils getActorUtils()
-
closeTransaction
public void closeTransaction()
-
readyTransaction
public scala.concurrent.Future<ActorSelection> readyTransaction(Boolean havePermit, Optional<SortedSet<String>> participatingShardNames)
-
transformReadyReply
protected scala.concurrent.Future<ActorSelection> transformReadyReply(scala.concurrent.Future<Object> readyReplyFuture)
-
sendBatchedModifications
protected scala.concurrent.Future<Object> sendBatchedModifications()
-
sendBatchedModifications
protected scala.concurrent.Future<Object> sendBatchedModifications(boolean ready, boolean doCommitOnReady, Optional<SortedSet<String>> participatingShardNames)
-
executeDelete
public void executeDelete(YangInstanceIdentifier path, Boolean havePermit)
-
executeMerge
public void executeMerge(YangInstanceIdentifier path, NormalizedNode data, Boolean havePermit)
-
executeWrite
public void executeWrite(YangInstanceIdentifier path, NormalizedNode data, Boolean havePermit)
-
executeRead
public <T> void executeRead(AbstractRead<T> readCmd, SettableFuture<T> returnFuture, Boolean havePermit)
-
usesOperationLimiting
public boolean usesOperationLimiting()
-
getIdentifier
protected final @NonNull TransactionIdentifier getIdentifier()
Get the transaction identifier associated with this context.- Returns:
- Transaction identifier.
-
incrementModificationCount
protected final void incrementModificationCount()
-
logModificationCount
protected final void logModificationCount()
-
operationHandOffComplete
public final void operationHandOffComplete()
-
isOperationHandOffComplete
protected boolean isOperationHandOffComplete()
-
getTransactionVersion
public short getTransactionVersion()
-
-