public abstract class LocalTransaction extends AbstractCacheTransaction
RemoteTransaction
.CacheTransaction.TransactionCompletedListener
affectedKeys, lookedUpEntries, modifications, topologyId, tx
Constructor and Description |
---|
LocalTransaction(Transaction transaction,
GlobalTransaction tx,
boolean implicitTransaction,
int topologyId,
long txCreationTime) |
Modifier and Type | Method and Description |
---|---|
void |
addModification(WriteCommand mod) |
void |
clearRemoteLocksAcquired() |
boolean |
equals(Object o) |
Collection<Address> |
getCommitNodes(Collection<Address> recipients,
CacheTopology cacheTopology)
Calculates the list of nodes to which a commit/rollback needs to be sent based on the nodes to which prepare
was sent.
|
CompletionStage<IracMetadata> |
getIracMetadata(Object key) |
Map<Object,CacheEntry> |
getLookedUpEntries() |
Collection<Address> |
getRemoteLocksAcquired() |
Transaction |
getTransaction() |
int |
hashCode() |
boolean |
hasIracMetadata(Object key) |
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() |
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) |
void |
storeIracMetadata(Object key,
CompletionStage<IracMetadata> metadata)
Stores the
IracMetadata associated with key . |
String |
toString() |
addAffectedKey, addAllAffectedKeys, addBackupLockForKey, addListener, addVersionRead, cleanupBackupLocks, clearLockedKeys, clearLookedUpEntries, forEachBackupLock, forEachLock, freezeModifications, getAffectedKeys, getAllModifications, getBackupLockedKeys, getCreationTime, getGlobalTransaction, getLockedKeys, getModifications, getReleaseFutureForKey, getReleaseFutureForKeys, getStateTransferFlag, getTopologyId, getUpdatedEntryVersions, getVersionsRead, hasModification, isFromStateTransfer, isMarkedForRollback, lookupEntry, markForRollback, notifyOnTransactionFinished, ownsLock, registerLockedKey, removeBackupLock, removeBackupLocks, removeLookedUpEntry, setModifications, setUpdatedEntryVersions
public LocalTransaction(Transaction transaction, GlobalTransaction tx, boolean implicitTransaction, int topologyId, 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 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 void setStateTransferFlag(Flag stateTransferFlag)
setStateTransferFlag
in class AbstractCacheTransaction
public boolean isFromRemoteSite()
public void setFromRemoteSite(boolean fromRemoteSite)
isFromRemoteSite()
public Collection<Address> getCommitNodes(Collection<Address> recipients, CacheTopology cacheTopology)
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()
public boolean hasIracMetadata(Object key)
true
if there is an IracMetadata
stored for key
.public void storeIracMetadata(Object key, CompletionStage<IracMetadata> metadata)
IracMetadata
associated with key
.key
- The key.metadata
- The CompletionStage
that will be completed with IracMetadata
to associate.public CompletionStage<IracMetadata> getIracMetadata(Object key)
IracMetadata
associated with key
.Copyright © 2021 JBoss by Red Hat. All rights reserved.