public abstract class LocalTransaction extends AbstractCacheTransaction
RemoteTransaction.CacheTransaction.TransactionCompletedListeneraffectedKeys, hasLocalOnlyModifications, keyEquivalence, lookedUpEntries, modifications, topologyId, tx| Constructor and Description |
|---|
LocalTransaction(Transaction transaction,
GlobalTransaction tx,
boolean implicitTransaction,
int topologyId,
Equivalence<Object> keyEquivalence,
long txCreationTime) |
| Modifier and Type | Method and Description |
|---|---|
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 |
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 |
setStateTransferFlag(Flag stateTransferFlag) |
String |
toString() |
addAffectedKey, addAllAffectedKeys, addBackupLockForKey, addListener, addVersionRead, areLocksReleased, cleanupBackupLocks, clearLockedKeys, clearLookedUpEntries, containsLockOrBackupLock, findAnyLockedOrBackupLocked, freezeModifications, getAffectedKeys, getAllModifications, getBackupLockedKeys, getCreationTime, getGlobalTransaction, getLockedKeys, getLookedUpRemoteVersion, getModifications, getReleaseFutureForKey, getReleaseFutureForKeys, getStateTransferFlag, getTopologyId, getUpdatedEntryVersions, getVersionsRead, hasModification, internalSetStateTransferFlag, isFromStateTransfer, isMarkedForRollback, lookupEntry, markForRollback, notifyOnTransactionFinished, ownsLock, putLookedUpRemoteVersion, registerLockedKey, removeLookedUpEntry, replaceVersionRead, setModifications, setUpdatedEntryVersions, waitForLockReleasepublic LocalTransaction(Transaction transaction, GlobalTransaction tx, boolean implicitTransaction, int topologyId, Equivalence<Object> keyEquivalence, long txCreationTime)
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 CacheTransactiongetLookedUpEntries in class AbstractCacheTransactionpublic boolean isImplicitTransaction()
public void putLookedUpEntry(Object key, CacheEntry e)
public void putLookedUpEntries(Map<Object,CacheEntry> entries)
public boolean isReadOnly()
public abstract boolean isEnlisted()
public void addReadKey(Object key)
addReadKey in interface CacheTransactionaddReadKey in class AbstractCacheTransactionpublic boolean keyRead(Object key)
keyRead in interface CacheTransactionkeyRead in class AbstractCacheTransactionpublic void setStateTransferFlag(Flag stateTransferFlag)
setStateTransferFlag in class AbstractCacheTransactionpublic 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()
Copyright © 2024 JBoss, a division of Red Hat. All rights reserved.