Class MessageGroupHashBucket
- java.lang.Object
-
- org.apache.activemq.broker.region.group.MessageGroupHashBucket
-
- All Implemented Interfaces:
MessageGroupMap
public class MessageGroupHashBucket extends Object implements MessageGroupMap
Uses hash-code buckets to associate consumers with sets of message group IDs.
-
-
Constructor Summary
Constructors Constructor Description MessageGroupHashBucket(int bucketCount, int cachedSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MessageGroupSetcreateMessageGroupSet(int bucketNumber)protected MessageGroupSetcreateMessageGroupSet(int bucketNumber, MessageGroupSet parent)ConsumerIdget(String groupId)intgetBucketCount()protected intgetBucketNumber(String groupId)Map<String,String>getGroups()StringgetType()voidput(String groupId, ConsumerId consumerId)voidremoveAll()MessageGroupSetremoveConsumer(ConsumerId consumerId)ConsumerIdremoveGroup(String groupId)voidsetDestination(Destination destination)StringtoString()
-
-
-
Method Detail
-
put
public void put(String groupId, ConsumerId consumerId)
- Specified by:
putin interfaceMessageGroupMap
-
get
public ConsumerId get(String groupId)
- Specified by:
getin interfaceMessageGroupMap
-
removeGroup
public ConsumerId removeGroup(String groupId)
- Specified by:
removeGroupin interfaceMessageGroupMap
-
removeConsumer
public MessageGroupSet removeConsumer(ConsumerId consumerId)
- Specified by:
removeConsumerin interfaceMessageGroupMap
-
removeAll
public void removeAll()
- Specified by:
removeAllin interfaceMessageGroupMap
-
getGroups
public Map<String,String> getGroups()
- Specified by:
getGroupsin interfaceMessageGroupMap- Returns:
- a map of group names and associated consumer Id
-
getType
public String getType()
- Specified by:
getTypein interfaceMessageGroupMap
-
setDestination
public void setDestination(Destination destination)
- Specified by:
setDestinationin interfaceMessageGroupMap
-
getBucketCount
public int getBucketCount()
-
createMessageGroupSet
protected MessageGroupSet createMessageGroupSet(int bucketNumber, MessageGroupSet parent)
-
createMessageGroupSet
protected MessageGroupSet createMessageGroupSet(int bucketNumber)
-
getBucketNumber
protected int getBucketNumber(String groupId)
-
-