Class TotalOrderVersionedDistributionInterceptor

  • All Implemented Interfaces:
    org.infinispan.commands.Visitor, AsyncInterceptor

    public class TotalOrderVersionedDistributionInterceptor
    extends VersionedDistributionInterceptor
    This interceptor is used in total order in distributed mode when the write skew check is enabled. After sending the prepare through TOA (Total Order Anycast), it blocks the execution thread until the transaction outcome is known (i.e., the write skew check passes in all keys owners)
    Author:
    Pedro Ruivo
    • Constructor Detail

      • TotalOrderVersionedDistributionInterceptor

        public TotalOrderVersionedDistributionInterceptor()
    • Method Detail

      • start

        public void start()
      • visitRollbackCommand

        public java.lang.Object visitRollbackCommand​(org.infinispan.context.impl.TxInvocationContext ctx,
                                                     org.infinispan.commands.tx.RollbackCommand command)
                                              throws java.lang.Throwable
        Specified by:
        visitRollbackCommand in interface org.infinispan.commands.Visitor
        Overrides:
        visitRollbackCommand in class TxDistributionInterceptor
        Throws:
        java.lang.Throwable
      • visitCommitCommand

        public java.lang.Object visitCommitCommand​(org.infinispan.context.impl.TxInvocationContext ctx,
                                                   org.infinispan.commands.tx.CommitCommand command)
                                            throws java.lang.Throwable
        Specified by:
        visitCommitCommand in interface org.infinispan.commands.Visitor
        Overrides:
        visitCommitCommand in class TxDistributionInterceptor
        Throws:
        java.lang.Throwable
      • prepareOnAffectedNodes

        protected java.util.concurrent.CompletionStage<java.lang.Object> prepareOnAffectedNodes​(org.infinispan.context.impl.TxInvocationContext<?> ctx,
                                                                                                org.infinispan.commands.tx.PrepareCommand command,
                                                                                                java.util.Collection<Address> recipients)
        Overrides:
        prepareOnAffectedNodes in class VersionedDistributionInterceptor