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 protectedRemoteTransactionContext(TransactionIdentifier identifier, ActorSelection actor, ActorUtils actorUtils, short remoteTransactionVersion, OperationLimiter limiter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcloseTransaction()scala.concurrent.Future<Object>directCommit(Boolean havePermit)voidexecuteModification(AbstractModification modification, Boolean havePermit)<T> voidexecuteRead(AbstractRead<T> readCmd, SettableFuture<T> returnFuture, Boolean havePermit)protected ActorUtilsgetActorUtils()protected @NonNull TransactionIdentifiergetIdentifier()Get the transaction identifier associated with this context.shortgetTransactionVersion()protected voidincrementModificationCount()protected booleanisOperationHandOffComplete()protected voidlogModificationCount()voidoperationHandOffComplete()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)booleanusesOperationLimiting()
-
-
-
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)
-
executeModification
public void executeModification(AbstractModification modification, 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()
-
-