|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.infinispan.transaction.AbstractCacheTransaction org.infinispan.transaction.LocalTransaction
public abstract class LocalTransaction
Object that holds transaction's state on the node where it originated; as opposed to RemoteTransaction
.
Field Summary |
---|
Fields inherited from class org.infinispan.transaction.AbstractCacheTransaction |
---|
affectedKeys, backupKeyLocks, hasLocalOnlyModifications, keyEquivalence, lockedKeys, lookedUpEntries, modifications, topologyId, tx |
Constructor Summary | |
---|---|
LocalTransaction(Transaction transaction,
GlobalTransaction tx,
boolean implicitTransaction,
int topologyId,
Equivalence<Object> keyEquivalence)
|
Method Summary | |
---|---|
void |
addModification(WriteCommand mod)
|
void |
addReadKey(Object key)
|
void |
clearRemoteLocksAcquired()
|
boolean |
equals(Object o)
|
Collection<Address> |
getCommitNodes(Collection<Address> recipients,
int currentTopologyId,
Collection<Address> members)
Calculates the list of nodes to which a commit/rollback needs to be sent based on the nodes to which prepare was sent. |
Map<Object,CacheEntry> |
getLookedUpEntries()
|
Collection<Address> |
getRemoteLocksAcquired()
|
Transaction |
getTransaction()
|
int |
hashCode()
|
boolean |
isCommitOrRollbackSent()
|
abstract boolean |
isEnlisted()
|
boolean |
isFromRemoteSite()
When x-site replication is used, this returns when this operation happens as a result of backing up data from a remote site. |
boolean |
isFromStateTransfer()
|
boolean |
isImplicitTransaction()
|
boolean |
isPrepareSent()
|
boolean |
isReadOnly()
|
boolean |
keyRead(Object key)
|
void |
locksAcquired(Collection<Address> nodes)
|
void |
markCommitOrRollbackSent()
Sets the commit or rollback sent for this transaction |
void |
markPrepareSent()
Sets the prepare sent for this transaction |
void |
putLookedUpEntries(Map<Object,CacheEntry> entries)
|
void |
putLookedUpEntry(Object key,
CacheEntry e)
|
void |
setFromRemoteSite(boolean fromRemoteSite)
|
void |
setFromStateTransfer(boolean isFromStateTransfer)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LocalTransaction(Transaction transaction, GlobalTransaction tx, boolean implicitTransaction, int topologyId, Equivalence<Object> keyEquivalence)
Method Detail |
---|
public final void addModification(WriteCommand mod)
public void locksAcquired(Collection<Address> nodes)
public Collection<Address> getRemoteLocksAcquired()
public void clearRemoteLocksAcquired()
public Transaction getTransaction()
public Map<Object,CacheEntry> getLookedUpEntries()
getLookedUpEntries
in interface CacheTransaction
getLookedUpEntries
in class AbstractCacheTransaction
public boolean isImplicitTransaction()
public void putLookedUpEntry(Object key, CacheEntry e)
public void putLookedUpEntries(Map<Object,CacheEntry> entries)
public boolean isReadOnly()
public abstract boolean isEnlisted()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
public void addReadKey(Object key)
addReadKey
in interface CacheTransaction
addReadKey
in class AbstractCacheTransaction
public boolean keyRead(Object key)
keyRead
in interface CacheTransaction
keyRead
in class AbstractCacheTransaction
public boolean isFromStateTransfer()
public void setFromStateTransfer(boolean isFromStateTransfer)
public boolean isFromRemoteSite()
public void setFromRemoteSite(boolean fromRemoteSite)
isFromRemoteSite()
public Collection<Address> getCommitNodes(Collection<Address> recipients, int currentTopologyId, Collection<Address> members)
AbstractCacheTransaction.getTopologyId()
then
this method returns the reunion between 'recipients' and getRemoteLocksAcquired()
from which it discards
the members that left.
public final void markPrepareSent()
public final boolean isPrepareSent()
public final void markCommitOrRollbackSent()
public final boolean isCommitOrRollbackSent()
|
--> | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |