Package org.hobbit.core.rabbit
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 Summary
Fields Modifier and Type Field Description private SemaphoremaxBufferedMessageCountprivate intsuccessfullySubmittedprivate SortedMap<Long,DataSenderImpl.Message>unconfirmedMsgs
-
Constructor Summary
Constructors Constructor Description DataSenderConfirmHandler(int messageConfirmBuffer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandleAck(long deliveryTag, boolean multiple)voidhandleNack(long deliveryTag, boolean multiple)private voidsendData_unsecured(DataSenderImpl.Message message)voidsendDataWithConfirmation(com.rabbitmq.client.AMQP.BasicProperties properties, byte[] data)voidwaitForConfirms()
-
-
-
Field Detail
-
maxBufferedMessageCount
private final Semaphore maxBufferedMessageCount
-
unconfirmedMsgs
private final SortedMap<Long,DataSenderImpl.Message> unconfirmedMsgs
-
successfullySubmitted
private int successfullySubmitted
-
-
Method Detail
-
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:
handleAckin interfacecom.rabbitmq.client.ConfirmListener- Throws:
IOException
-
handleNack
public void handleNack(long deliveryTag, boolean multiple) throws IOException- Specified by:
handleNackin interfacecom.rabbitmq.client.ConfirmListener- Throws:
IOException
-
waitForConfirms
public void waitForConfirms() throws InterruptedException- Throws:
InterruptedException
-
-