Class RecoveryAwareRemoteTransaction

  • All Implemented Interfaces:
    java.lang.Cloneable, CacheTransaction, RecoveryAwareTransaction

    public class RecoveryAwareRemoteTransaction
    extends org.infinispan.transaction.impl.RemoteTransaction
    implements RecoveryAwareTransaction
    Extends RemoteTransaction and adds recovery related information and functionality.
    Since:
    5.0
    Author:
    Mircea.Markus@jboss.com
    • Constructor Detail

      • RecoveryAwareRemoteTransaction

        public RecoveryAwareRemoteTransaction​(org.infinispan.commands.write.WriteCommand[] modifications,
                                              GlobalTransaction tx,
                                              int topologyId,
                                              long txCreationTime)
      • RecoveryAwareRemoteTransaction

        public RecoveryAwareRemoteTransaction​(GlobalTransaction tx,
                                              int topologyId,
                                              long txCreationTime)
    • Method Detail

      • isInDoubt

        public boolean isInDoubt()
        A transaction is in doubt if it is prepared and and it is orphan.
      • isOrphan

        public boolean isOrphan()
        A remote transaction is orphan if the node on which the transaction originated (ie the originator) is no longer part of the cluster.
      • computeOrphan

        public void computeOrphan​(java.util.Collection<Address> currentMembers)
        Check's if this transaction's originator is no longer part of the cluster (orphan transaction) and updates isOrphan().
        Parameters:
        currentMembers - The current members of the cache.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class org.infinispan.transaction.impl.RemoteTransaction
      • markCompleted

        public void markCompleted​(boolean committed)
        Called when after the 2nd phase of a 2PC is successful.
        Parameters:
        committed - true if tx successfully committed, false if tx successfully rolled back.
      • getStatus

        public java.lang.Integer getStatus()
        Following values might be returned:
        • - Status.STATUS_PREPARED if the tx is prepared
        • - Status.STATUS_COMMITTED if the tx is committed
        • - Status.STATUS_ROLLEDBACK if the tx is rollback
        • - null otherwise