Class RecoveryAwareRemoteTransaction

    • Constructor Detail

      • RecoveryAwareRemoteTransaction

        public RecoveryAwareRemoteTransaction​(List<org.infinispan.commands.write.WriteCommand> modifications,
                                              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​(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.
      • 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 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