Class ProtonAbstractReceiver

    • Field Detail

      • receiver

        protected final org.apache.qpid.proton.engine.Receiver receiver
      • amqpCredits

        protected final int amqpCredits
      • minCreditRefresh

        protected final int minCreditRefresh
      • minLargeMessageSize

        protected final int minLargeMessageSize
      • creditRunnable

        protected final java.lang.Runnable creditRunnable
        We create this AtomicRunnable with setRan. This is because we always reuse the same instance. In case the creditRunnable was run, we reset and send it over. We set it as ran as the first one should always go through
      • useModified

        protected final boolean useModified
      • pendingSettles

        protected int pendingSettles
    • Method Detail

      • isBellowThreshold

        public static boolean isBellowThreshold​(int credit,
                                                int pending,
                                                int threshold)
      • calculatedUpdateRefill

        public static int calculatedUpdateRefill​(int refill,
                                                 int credits,
                                                 int pending)
      • recoverContext

        protected void recoverContext()
      • clearLargeMessage

        protected void clearLargeMessage()
      • createCreditRunnable

        public static java.lang.Runnable createCreditRunnable​(int refill,
                                                              int threshold,
                                                              org.apache.qpid.proton.engine.Receiver receiver,
                                                              AMQPConnectionContext connection,
                                                              ProtonAbstractReceiver context)
        This Credit Runnable may be used in Mock tests to simulate the credit semantic here
      • createCreditRunnable

        public static java.lang.Runnable createCreditRunnable​(int refill,
                                                              int threshold,
                                                              org.apache.qpid.proton.engine.Receiver receiver,
                                                              AMQPConnectionContext connection)
        This Credit Runnable may be used in Mock tests to simulate the credit semantic here
      • incrementSettle

        public void incrementSettle()
      • settle

        public void settle​(org.apache.qpid.proton.engine.Delivery settlement)
      • initializeCurrentLargeMessage

        protected void initializeCurrentLargeMessage​(org.apache.qpid.proton.engine.Delivery delivery,
                                                     org.apache.qpid.proton.engine.Receiver receiver)
                                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • actualDelivery

        protected abstract void actualDelivery​(AMQPMessage message,
                                               org.apache.qpid.proton.engine.Delivery delivery,
                                               org.apache.qpid.proton.engine.Receiver receiver,
                                               org.apache.activemq.artemis.core.transaction.Transaction tx)
      • flow

        public abstract void flow()