Class DataSenderImpl.DataSenderConfirmHandler

java.lang.Object
org.hobbit.core.rabbit.DataSenderImpl.DataSenderConfirmHandler
All Implemented Interfaces:
com.rabbitmq.client.ConfirmListener
Enclosing class:
DataSenderImpl

protected class DataSenderImpl.DataSenderConfirmHandler extends Object implements com.rabbitmq.client.ConfirmListener
  • Field Details

    • maxBufferedMessageCount

      private final Semaphore maxBufferedMessageCount
    • unconfirmedMsgs

      private final SortedMap<Long,DataSenderImpl.Message> unconfirmedMsgs
    • successfullySubmitted

      private int successfullySubmitted
  • Constructor Details

    • DataSenderConfirmHandler

      public DataSenderConfirmHandler(int messageConfirmBuffer)
  • Method Details

    • sendDataWithConfirmation

      public void sendDataWithConfirmation(com.rabbitmq.client.AMQP.BasicProperties properties, byte[] data) throws IOException
      Throws:
      IOException
    • sendData_unsecured

      private void sendData_unsecured(DataSenderImpl.Message message) throws IOException
      Throws:
      IOException
    • handleAck

      public void handleAck(long deliveryTag, boolean multiple) throws IOException
      Specified by:
      handleAck in interface com.rabbitmq.client.ConfirmListener
      Throws:
      IOException
    • handleNack

      public void handleNack(long deliveryTag, boolean multiple) throws IOException
      Specified by:
      handleNack in interface com.rabbitmq.client.ConfirmListener
      Throws:
      IOException
    • waitForConfirms

      public void waitForConfirms() throws InterruptedException
      Throws:
      InterruptedException