Class AMQPMirrorControllerTarget

All Implemented Interfaces:
org.apache.activemq.artemis.core.server.mirror.MirrorController, ProtonDeliveryHandler

public class AMQPMirrorControllerTarget extends ProtonAbstractReceiver implements org.apache.activemq.artemis.core.server.mirror.MirrorController
  • Constructor Details

  • Method Details

    • setControllerInUse

      public static void setControllerInUse(org.apache.activemq.artemis.core.server.mirror.MirrorController controller)
    • getControllerInUse

      public static org.apache.activemq.artemis.core.server.mirror.MirrorController getControllerInUse()
    • isBusy

      public boolean isBusy()
      Overrides:
      isBusy in class ProtonAbstractReceiver
    • getMirrorMaxPendingAcks

      public int getMirrorMaxPendingAcks()
    • verifyCredits

      public void verifyCredits()
    • close

      public void close(boolean remoteLinkClose) throws ActiveMQAMQPException
      Specified by:
      close in interface ProtonDeliveryHandler
      Overrides:
      close in class ProtonAbstractReceiver
      Throws:
      ActiveMQAMQPException
    • flush

      public void flush()
      This method will wait both replication and storage to finish their current operations.
    • getRemoteMirrorId

      public String getRemoteMirrorId()
      Specified by:
      getRemoteMirrorId in interface org.apache.activemq.artemis.core.server.mirror.MirrorController
    • doCreditTopUpRun

      protected void doCreditTopUpRun()
      Description copied from class: ProtonAbstractReceiver
      Performs the actual credit top up logic for the receiver.

      This can be overridden in the subclass to run its own logic for credit top up instead of using the default logic used in this abstract base.

      Overrides:
      doCreditTopUpRun in class ProtonAbstractReceiver
    • actualDelivery

      protected void actualDelivery(Message message, org.apache.qpid.proton.engine.Delivery delivery, org.apache.qpid.proton.amqp.messaging.DeliveryAnnotations deliveryAnnotations, org.apache.qpid.proton.engine.Receiver receiver, org.apache.activemq.artemis.core.transaction.Transaction tx)
      Description copied from class: ProtonAbstractReceiver
      Perform the actual message processing for an inbound message. The subclass either consumes and settles the message in place or hands it off to another intermediary who is responsible for eventually settling the newly read message.
      Specified by:
      actualDelivery in class ProtonAbstractReceiver
      Parameters:
      message - The message as provided from the remote or after local transformation by subclass.
      delivery - The proton delivery where the message bytes where read from
      deliveryAnnotations - The delivery annotations if present that accompanied the incoming message.
      receiver - The proton receiver that represents the link over which the message was sent.
      tx - The transaction under which the incoming message was sent.
    • initialize

      public void initialize() throws Exception
      Specified by:
      initialize in class ProtonInitializable
      Throws:
      Exception
    • preAcknowledge

      public void preAcknowledge(org.apache.activemq.artemis.core.transaction.Transaction tx, org.apache.activemq.artemis.core.server.MessageReference ref, org.apache.activemq.artemis.core.server.impl.AckReason reason) throws Exception
      Specified by:
      preAcknowledge in interface org.apache.activemq.artemis.core.server.mirror.MirrorController
      Throws:
      Exception
    • addAddress

      public void addAddress(org.apache.activemq.artemis.core.server.impl.AddressInfo addressInfo) throws Exception
      Specified by:
      addAddress in interface org.apache.activemq.artemis.core.server.mirror.MirrorController
      Throws:
      Exception
    • deleteAddress

      public void deleteAddress(org.apache.activemq.artemis.core.server.impl.AddressInfo addressInfo) throws Exception
      Specified by:
      deleteAddress in interface org.apache.activemq.artemis.core.server.mirror.MirrorController
      Throws:
      Exception
    • createQueue

      public void createQueue(QueueConfiguration queueConfiguration) throws Exception
      Specified by:
      createQueue in interface org.apache.activemq.artemis.core.server.mirror.MirrorController
      Throws:
      Exception
    • deleteQueue

      public void deleteQueue(SimpleString addressName, SimpleString queueName) throws Exception
      Specified by:
      deleteQueue in interface org.apache.activemq.artemis.core.server.mirror.MirrorController
      Throws:
      Exception
    • postAcknowledge

      public boolean postAcknowledge(String queue, String nodeID, long messageID, org.apache.activemq.artemis.protocol.amqp.connect.mirror.AMQPMirrorControllerTarget.ACKMessageOperation ackMessage, org.apache.activemq.artemis.core.server.impl.AckReason reason) throws Exception
      Throws:
      Exception
    • postAcknowledge

      public void postAcknowledge(org.apache.activemq.artemis.core.server.MessageReference ref, org.apache.activemq.artemis.core.server.impl.AckReason reason)
      Specified by:
      postAcknowledge in interface org.apache.activemq.artemis.core.server.mirror.MirrorController
    • sendMessage

      public void sendMessage(org.apache.activemq.artemis.core.transaction.Transaction tx, Message message, org.apache.activemq.artemis.core.server.RoutingContext context)
      Specified by:
      sendMessage in interface org.apache.activemq.artemis.core.server.mirror.MirrorController
    • getAddressInUse

      protected SimpleString getAddressInUse()
      Description copied from class: ProtonAbstractReceiver
      Returns either the fixed address assigned to this sender, or the last address used by an anonymous relay sender; if this is an anonymous relay and no send has occurred then this method returns null.
      Specified by:
      getAddressInUse in class ProtonAbstractReceiver
      Returns:
      either the fixed address assigned to this sender, or the last address used by an anonymous relay sender; if this is an anonymous relay and no send has occurred then this method returns null