Class BucketMessageGroups<C>
- java.lang.Object
-
- org.apache.activemq.artemis.core.server.impl.BucketMessageGroups<C>
-
- All Implemented Interfaces:
MessageGroups<C>
public class BucketMessageGroups<C> extends Object implements MessageGroups<C>
BucketMessageGroups, stores values against a bucket, where the bucket used is based on the provided key objects hash. As such where keys compute to the same bucket they will act on that stored value, not the unique specific key. The number of buckets is provided at construction.
-
-
Constructor Summary
Constructors Constructor Description BucketMessageGroups(int bucketCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Cget(SimpleString key)voidput(SimpleString key, C consumer)Cremove(SimpleString key)voidremoveAll()booleanremoveIf(Predicate<? super C> filter)intsize()Map<SimpleString,C>toMap()
-
-
-
Method Detail
-
put
public void put(SimpleString key, C consumer)
- Specified by:
putin interfaceMessageGroups<C>
-
get
public C get(SimpleString key)
- Specified by:
getin interfaceMessageGroups<C>
-
remove
public C remove(SimpleString key)
- Specified by:
removein interfaceMessageGroups<C>
-
removeIf
public boolean removeIf(Predicate<? super C> filter)
- Specified by:
removeIfin interfaceMessageGroups<C>
-
removeAll
public void removeAll()
- Specified by:
removeAllin interfaceMessageGroups<C>
-
size
public int size()
- Specified by:
sizein interfaceMessageGroups<C>
-
toMap
public Map<SimpleString,C> toMap()
- Specified by:
toMapin interfaceMessageGroups<C>
-
-