Class UnsettledMap<Delivery>
java.lang.Object
org.apache.qpid.protonj2.engine.util.UnsettledMap<Delivery>
- Type Parameters:
- Delivery- The delivery type being tracker (incoming or outgoing)
- All Implemented Interfaces:
- Map<UnsignedInteger,- Delivery> 
A specialized collection like entity that is used to keep track of unsettled
 incoming and outgoing deliveries for AMQP links and the sessions that manage
 those links.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classstatic interface
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected Set<Map.Entry<UnsignedInteger,Delivery>> protected Set<UnsignedInteger>protected Collection<Delivery>
- 
Constructor SummaryConstructorsConstructorDescriptionUnsettledMap(UnsettledMap.UnsettledGetDeliveryId<Delivery> idSupplier) UnsettledMap(UnsettledMap.UnsettledGetDeliveryId<Delivery> idSupplier, int initialBuckets) UnsettledMap(UnsettledMap.UnsettledGetDeliveryId<Delivery> idSupplier, int initialBuckets, int bucketSize) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidclear()booleancontainsKey(int key) booleancontainsKey(Object key) booleancontainsValue(Object value) entrySet()booleanvoidVisits each entry within the given range and invokes the provided action on each delivery in the tracker.voidforEach(BiConsumer<? super UnsignedInteger, ? super Delivery> action) voidget(int deliveryId) booleanisEmpty()keySet()Adds the given key and value pair in this tracking structure at the end of the current series.put(UnsignedInteger key, Delivery value) voidputAll(Map<? extends UnsignedInteger, ? extends Delivery> source) remove(int deliveryId) voidremoveEach(int first, int last, Consumer<Delivery> action) Remove each entry within the given range of delivery IDs.intsize()toString()values()Methods inherited from class java.lang.Objectclone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Mapcompute, computeIfAbsent, computeIfPresent, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
- 
Field Details- 
keySet
- 
values
- 
entrySet
 
- 
- 
Constructor Details- 
UnsettledMap
- 
UnsettledMap
- 
UnsettledMappublic UnsettledMap(UnsettledMap.UnsettledGetDeliveryId<Delivery> idSupplier, int initialBuckets, int bucketSize) 
 
- 
- 
Method Details- 
putAll- Specified by:
- putAllin interface- Map<UnsignedInteger,- Delivery> 
 
- 
clearpublic void clear()- Specified by:
- clearin interface- Map<UnsignedInteger,- Delivery> 
 
- 
put- Specified by:
- putin interface- Map<UnsignedInteger,- Delivery> 
 
- 
putAdds the given key and value pair in this tracking structure at the end of the current series.If the map previously contained a mapping for the key, the old value is not replaced by the specified value unlike a traditional map as this structure is tracking the running series of values. This would imply that duplicates can exist in the tracker, however given the likelihood of this occurring in the normal flow of deliveries should be considered extremely low. - Parameters:
- deliveryId- The delivery ID of the delivery being added to this tracker.
- delivery- The delivery that is being added to the tracker
- Returns:
- null in all cases as this tracker does not check for duplicates.
 
- 
sizepublic int size()- Specified by:
- sizein interface- Map<UnsignedInteger,- Delivery> 
 
- 
isEmptypublic boolean isEmpty()- Specified by:
- isEmptyin interface- Map<UnsignedInteger,- Delivery> 
 
- 
get- Specified by:
- getin interface- Map<UnsignedInteger,- Delivery> 
 
- 
get
- 
remove- Specified by:
- removein interface- Map<UnsignedInteger,- Delivery> 
 
- 
remove
- 
containsKey- Specified by:
- containsKeyin interface- Map<UnsignedInteger,- Delivery> 
 
- 
containsKeypublic boolean containsKey(int key) 
- 
containsValue- Specified by:
- containsValuein interface- Map<UnsignedInteger,- Delivery> 
 
- 
forEach
- 
forEachVisits each entry within the given range and invokes the provided action on each delivery in the tracker.- Parameters:
- first- The first entry to visit.
- last- The last entry to visit.
- action- The action to invoke on each visited entry.
 
- 
removeEachRemove each entry within the given range of delivery IDs. For each entry removed the provided action is triggered allowing the caller to be notified of each removal.- Parameters:
- first- The first entry to remove
- last- The last entry to remove
- action- The action to invoke on each remove.
 
- 
forEach- Specified by:
- forEachin interface- Map<UnsignedInteger,- Delivery> 
 
- 
values- Specified by:
- valuesin interface- Map<UnsignedInteger,- Delivery> 
 
- 
keySet- Specified by:
- keySetin interface- Map<UnsignedInteger,- Delivery> 
 
- 
entrySet- Specified by:
- entrySetin interface- Map<UnsignedInteger,- Delivery> 
 
- 
equals
- 
toString
 
-