java.lang.Object
org.activemq.filter.DestinationMap
- public class DestinationMap
- extends java.lang.Object
A Map-like data structure allowing values to be indexed by org.activemq.message.ActiveMQDestination
and retrieved by destination - supporting both * and > style of wildcard
as well as composite destinations.
This class assumes that the index changes rarely but that fast lookup into the index is required.
So this class maintains a pre-calculated index for destination steps. So looking up the values
for "TEST.*" or "*.TEST" will be pretty fast.
Looking up of a value could return a single value or a List of matching values if a wildcard or
composite destination is used.
- Version:
- $Revision: 1.1.1.1 $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
rootNode
private DestinationMapNode rootNode
vanillaDestinations
private java.util.Map vanillaDestinations
containsWildCards
private boolean containsWildCards
ANY_DESCENDENT
protected static final java.lang.String ANY_DESCENDENT
- See Also:
- Constant Field Values
ANY_CHILD
protected static final java.lang.String ANY_CHILD
- See Also:
- Constant Field Values
nullAnswer
private java.util.Set nullAnswer
DestinationMap
public DestinationMap()
get
public java.util.Set get(org.activemq.message.ActiveMQDestination key)
- Looks up the value(s) matching the given Destination key. For simple destinations
this is typically a List of one single value, for wildcards or composite destinations this will typically be
a List of matching values.
put
public void put(org.activemq.message.ActiveMQDestination key,
java.lang.Object value)
- add destination to the map
remove
public void remove(org.activemq.message.ActiveMQDestination key,
java.lang.Object value)
- Removes the value from the associated destination
findWildcardMatches
protected java.util.Set findWildcardMatches(org.activemq.message.ActiveMQDestination key)
removeAll
public void removeAll(org.activemq.message.ActiveMQDestination key)
- remove all destinations associated with a key
addToVanillaDestinations
private void addToVanillaDestinations(org.activemq.message.ActiveMQDestination key,
java.lang.Object value)
removeFromVanillaDestinations
private void removeFromVanillaDestinations(org.activemq.message.ActiveMQDestination key,
java.lang.Object value)
removeAllFromVanillaDestinations
private void removeAllFromVanillaDestinations(org.activemq.message.ActiveMQDestination key)
getFromVanillaDestinations
private java.util.Set getFromVanillaDestinations(org.activemq.message.ActiveMQDestination key)
validateContainsWildCards
private void validateContainsWildCards(org.activemq.message.ActiveMQDestination key)