Package com.swiftmq.amqp.v100.client
Interface DeliveryMemory
-
- All Known Implementing Classes:
DefaultDeliveryMemory
public interface DeliveryMemory
Specifies a memory to store unsettled deliveries of a link (producer and consumer).- Author:
- IIT Software GmbH, Bremen/Germany, (c) 2012, All Rights Reserved
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addUnsettledDelivery(UnsettledDelivery unsettledDelivery)
Adds an unsettled delivery which consists of a delivery tag, the delivery state and the AMQP message.void
deliverySettled(DeliveryTag deliveryTag)
Removes an unsettled delivery from the memory.java.lang.String
getLinkName()
Returns the link name,int
getNumberUnsettled()
Returns the number of unsettled deliveries contained in this memory.java.util.Collection<UnsettledDelivery>
getUnsettled()
Returns a collection of all unsettled deliveries.void
setLinkName(java.lang.String name)
Will be called from the link to set its link name.
-
-
-
Method Detail
-
getLinkName
java.lang.String getLinkName()
Returns the link name,- Returns:
- link name
-
setLinkName
void setLinkName(java.lang.String name)
Will be called from the link to set its link name. This is only done if the name has not been set before and ensures that new created links that use this delivery memory use the same link name as before.- Parameters:
name
-
-
addUnsettledDelivery
void addUnsettledDelivery(UnsettledDelivery unsettledDelivery)
Adds an unsettled delivery which consists of a delivery tag, the delivery state and the AMQP message.- Parameters:
unsettledDelivery
- unsettled delivery
-
deliverySettled
void deliverySettled(DeliveryTag deliveryTag)
Removes an unsettled delivery from the memory.- Parameters:
deliveryTag
- delivery tag
-
getNumberUnsettled
int getNumberUnsettled()
Returns the number of unsettled deliveries contained in this memory.- Returns:
- number unsettled deliveries
-
getUnsettled
java.util.Collection<UnsettledDelivery> getUnsettled()
Returns a collection of all unsettled deliveries. The delivery memory remains untouched so the returned map is a copy (or better a clone) of the content.- Returns:
- unsettled deliveries
-
-