Class LocalTransaction

    • Constructor Detail

      • LocalTransaction

        public LocalTransaction​(Transaction transaction,
                                GlobalTransaction tx,
                                boolean implicitTransaction,
                                int topologyId,
                                long txCreationTime)
    • Method Detail

      • addModification

        public final void addModification​(org.infinispan.commands.write.WriteCommand mod)
      • clearRemoteLocksAcquired

        public void clearRemoteLocksAcquired()
      • isImplicitTransaction

        public boolean isImplicitTransaction()
      • putLookedUpEntry

        public void putLookedUpEntry​(Object key,
                                     CacheEntry e)
      • isReadOnly

        public boolean isReadOnly()
      • isEnlisted

        public abstract boolean isEnlisted()
      • hashCode

        public int hashCode()
        hashCode in class Object
      • addReadKey

        public void addReadKey​(Object key)
      • keyRead

        public boolean keyRead​(Object key)
      • isFromRemoteSite

        public 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.
      • setFromRemoteSite

        public void setFromRemoteSite​(boolean fromRemoteSite)
        See Also:
      • getCommitNodes

        public 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. If the commit/rollback is to be sent in the same topologyId, then the 'recipients' param is returned back. If the current topologyId is different than the topologyId of this transaction (AbstractCacheTransaction.getTopologyId() then this method returns the reunion between 'recipients' and getRemoteLocksAcquired() from which it discards the members that left.
      • markPrepareSent

        public final void markPrepareSent()
        Sets the prepare sent for this transaction
      • isPrepareSent

        public final boolean isPrepareSent()
        true if the prepare was sent to the other nodes
      • markCommitOrRollbackSent

        public final void markCommitOrRollbackSent()
        Sets the commit or rollback sent for this transaction
      • isCommitOrRollbackSent

        public final boolean isCommitOrRollbackSent()
        true if the commit or rollback was sent to the other nodes