org.infinispan.context.impl
Class AbstractTxInvocationContext

java.lang.Object
  extended by org.infinispan.context.impl.AbstractInvocationContext
      extended by org.infinispan.context.impl.AbstractTxInvocationContext
All Implemented Interfaces:
Cloneable, EntryLookup, FlagContainer, TxInvocationContext, InvocationContext
Direct Known Subclasses:
LocalTxInvocationContext, RemoteTxInvocationContext

public abstract class AbstractTxInvocationContext
extends AbstractInvocationContext
implements TxInvocationContext

Support class for TxInvocationContext.

Since:
4.0
Author:
Mircea.Markus@jboss.com

Nested Class Summary
 
Nested classes/interfaces inherited from class org.infinispan.context.impl.AbstractInvocationContext
AbstractInvocationContext.ContextFlag
 
Field Summary
protected  Set<Object> affectedKeys
           
 
Fields inherited from class org.infinispan.context.impl.AbstractInvocationContext
contextFlags, flags
 
Constructor Summary
AbstractTxInvocationContext()
           
 
Method Summary
 void addAffectedKeys(Collection<Object> keys)
          Registers a new participant with the transaction.
 AbstractTxInvocationContext clone()
           
 Set<Object> getAffectedKeys()
          Returns the set of keys that are affected by this transaction.
 boolean hasModifications()
          Were there any modifications performed within the tx's scope?
 boolean isInTxScope()
          Returns true if this call is performed in the context of an transaction, false otherwise.
 
Methods inherited from class org.infinispan.context.impl.AbstractInvocationContext
getFlags, getLockedKeys, hasFlag, hasLockedKey, isContextFlagSet, isFlagsUninitialized, isUseFutureReturnType, reset, setContextFlag, setContextFlag, setFlags, setFlags, setUseFutureReturnType, toString, unsetContextFlag
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.infinispan.context.impl.TxInvocationContext
getGlobalTransaction, getModifications, getRunningTransaction, isRunningTransactionValid
 
Methods inherited from interface org.infinispan.context.InvocationContext
getLockedKeys, getLockOwner, isOriginLocal, isUseFutureReturnType, setUseFutureReturnType
 
Methods inherited from interface org.infinispan.context.EntryLookup
clearLookedUpEntries, getLookedUpEntries, hasLockedKey, lookupEntry, putLookedUpEntries, putLookedUpEntry, removeLookedUpEntry
 
Methods inherited from interface org.infinispan.context.FlagContainer
getFlags, hasFlag, isFlagsUninitialized, reset, setFlags, setFlags
 

Field Detail

affectedKeys

protected Set<Object> affectedKeys
Constructor Detail

AbstractTxInvocationContext

public AbstractTxInvocationContext()
Method Detail

hasModifications

public boolean hasModifications()
Description copied from interface: TxInvocationContext
Were there any modifications performed within the tx's scope?

Specified by:
hasModifications in interface TxInvocationContext

getAffectedKeys

public Set<Object> getAffectedKeys()
Description copied from interface: TxInvocationContext
Returns the set of keys that are affected by this transaction. Used to generate appropriate recipient groups for cluster-wide prepare and commit calls.

Specified by:
getAffectedKeys in interface TxInvocationContext

addAffectedKeys

public void addAffectedKeys(Collection<Object> keys)
Description copied from interface: TxInvocationContext
Registers a new participant with the transaction.

Specified by:
addAffectedKeys in interface TxInvocationContext

isInTxScope

public boolean isInTxScope()
Description copied from interface: InvocationContext
Returns true if this call is performed in the context of an transaction, false otherwise.

Specified by:
isInTxScope in interface InvocationContext

clone

public AbstractTxInvocationContext clone()
Specified by:
clone in interface InvocationContext
Overrides:
clone in class AbstractInvocationContext

Google Analytics

Copyright © 2011 JBoss, a division of Red Hat. All Rights Reserved.