Package org.infinispan.context.impl
Class RemoteTxInvocationContext
- java.lang.Object
-
- org.infinispan.context.impl.AbstractInvocationContext
-
- org.infinispan.context.impl.AbstractTxInvocationContext<RemoteTransaction>
-
- org.infinispan.context.impl.RemoteTxInvocationContext
-
- All Implemented Interfaces:
Cloneable
,EntryLookup
,TxInvocationContext<RemoteTransaction>
,InvocationContext
public class RemoteTxInvocationContext extends AbstractTxInvocationContext<RemoteTransaction>
Context to be used for transaction that originated remotely.- Since:
- 4.0
- Author:
- Mircea.Markus@jboss.com, Galder ZamarreƱo, Pedro Ruivo
-
-
Constructor Summary
Constructors Constructor Description RemoteTxInvocationContext(RemoteTransaction cacheTransaction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Transaction
getTransaction()
Returns the tx associated with the current thread.int
hashCode()
boolean
isImplicitTransaction()
boolean
isOriginLocal()
Returns true if the call was originated locally, false if it is the result of a remote rpc.boolean
isTransactionValid()
-
Methods inherited from class org.infinispan.context.impl.AbstractTxInvocationContext
addAffectedKey, addAllAffectedKeys, addLockedKey, clearLockedKeys, getAffectedKeys, getCacheTransaction, getGlobalTransaction, getLockedKeys, getLockOwner, getLookedUpEntries, getModifications, hasModifications, isInTxScope, lookupEntry, putLookedUpEntry, removeLookedUpEntry, setLockOwner
-
Methods inherited from class org.infinispan.context.impl.AbstractInvocationContext
clone, getClassLoader, getOrigin, hasLockedKey, isEntryRemovedInContext, onEntryValueReplaced, setClassLoader
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.infinispan.context.EntryLookup
forEachEntry, forEachValue, lookedUpEntriesCount, removeLookedUpEntries
-
Methods inherited from interface org.infinispan.context.InvocationContext
clone, getClassLoader, getOrigin, hasLockedKey, isEntryRemovedInContext, replaceValue, setClassLoader
-
-
-
-
Constructor Detail
-
RemoteTxInvocationContext
public RemoteTxInvocationContext(RemoteTransaction cacheTransaction)
-
-
Method Detail
-
getTransaction
public final Transaction getTransaction()
Description copied from interface:TxInvocationContext
Returns the tx associated with the current thread. This method MUST be guarded with a call toInvocationContext.isOriginLocal()
, asTransaction
are not propagated from the node where tx was started.
-
isTransactionValid
public final boolean isTransactionValid()
- Returns:
- true if the current transaction is in a valid state to perform operations on (i.e.,RUNNING or PREPARING) or false otherwise.
-
isImplicitTransaction
public final boolean isImplicitTransaction()
-
isOriginLocal
public final boolean isOriginLocal()
Description copied from interface:InvocationContext
Returns true if the call was originated locally, false if it is the result of a remote rpc.- Specified by:
isOriginLocal
in interfaceInvocationContext
- Overrides:
isOriginLocal
in classAbstractInvocationContext
-
-