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 MessageGroupSet
createMessageGroupSet(int bucketNumber)
protected MessageGroupSet
createMessageGroupSet(int bucketNumber, MessageGroupSet parent)
ConsumerId
get(String groupId)
int
getBucketCount()
protected int
getBucketNumber(String groupId)
Map<String,String>
getGroups()
String
getType()
void
put(String groupId, ConsumerId consumerId)
void
removeAll()
MessageGroupSet
removeConsumer(ConsumerId consumerId)
ConsumerId
removeGroup(String groupId)
void
setDestination(Destination destination)
String
toString()
-
-
-
Method Detail
-
put
public void put(String groupId, ConsumerId consumerId)
- Specified by:
put
in interfaceMessageGroupMap
-
get
public ConsumerId get(String groupId)
- Specified by:
get
in interfaceMessageGroupMap
-
removeGroup
public ConsumerId removeGroup(String groupId)
- Specified by:
removeGroup
in interfaceMessageGroupMap
-
removeConsumer
public MessageGroupSet removeConsumer(ConsumerId consumerId)
- Specified by:
removeConsumer
in interfaceMessageGroupMap
-
removeAll
public void removeAll()
- Specified by:
removeAll
in interfaceMessageGroupMap
-
getGroups
public Map<String,String> getGroups()
- Specified by:
getGroups
in interfaceMessageGroupMap
- Returns:
- a map of group names and associated consumer Id
-
getType
public String getType()
- Specified by:
getType
in interfaceMessageGroupMap
-
setDestination
public void setDestination(Destination destination)
- Specified by:
setDestination
in 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)
-
-