Class SimpleAddressManager
java.lang.Object
org.apache.activemq.artemis.core.postoffice.impl.SimpleAddressManager
- All Implemented Interfaces:
AddressManager
- Direct Known Subclasses:
WildcardAddressManager
A simple address manager that maintains the addresses and bindings.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ConcurrentMap<SimpleString,Bindings> protected final MetricsManagerprotected final WildcardConfiguration -
Constructor Summary
ConstructorsConstructorDescriptionSimpleAddressManager(BindingsFactory bindingsFactory, WildcardConfiguration wildcardConfiguration, StorageManager storageManager, MetricsManager metricsManager) SimpleAddressManager(BindingsFactory bindingsFactory, StorageManager storageManager, MetricsManager metricsManager) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddAddressInfo(AddressInfo addressInfo) Returnstrueif the address was added, false if it wasn't added.booleanaddBinding(Binding binding) protected booleanaddMappingInternal(SimpleString address, Binding binding) protected BindingsaddMappingsInternal(SimpleString address, Collection<Binding> newBindings) protected voidbindingsEmpty(SimpleString realAddress, Bindings bindings) booleancheckAutoRemoveAddress(AddressInfo addressInfo, AddressSettings settings, boolean ignoreDelay) voidclear()findLocalBinding(long bindingID) getAddressInfo(SimpleString addressName) getBinding(SimpleString bindableName) getBindingsForRoutingAddress(SimpleString address) getDirectBindings(SimpleString address) getMatchingBindings(SimpleString address) getMatchingQueue(SimpleString address, RoutingType routingType) getMatchingQueue(SimpleString address, SimpleString queueName, RoutingType routingType) booleanreloadAddressInfo(AddressInfo addressInfo) removeAddressInfo(SimpleString address) removeBinding(SimpleString uniqueName, Transaction tx) This will use a Transaction as we need to confirm the queue was removedprotected voidremoveBindingInternal(SimpleString address, SimpleString bindableName) voidscanAddresses(MirrorController mirrorController) updateAddressInfo(SimpleString addressName, EnumSet<RoutingType> routingTypes) Update the specifiedAddressInfo
-
Field Details
-
mappings
-
metricsManager
-
wildcardConfiguration
-
-
Constructor Details
-
SimpleAddressManager
public SimpleAddressManager(BindingsFactory bindingsFactory, StorageManager storageManager, MetricsManager metricsManager) -
SimpleAddressManager
public SimpleAddressManager(BindingsFactory bindingsFactory, WildcardConfiguration wildcardConfiguration, StorageManager storageManager, MetricsManager metricsManager)
-
-
Method Details
-
findLocalBinding
- Specified by:
findLocalBindingin interfaceAddressManager
-
addBinding
- Specified by:
addBindingin interfaceAddressManager- Throws:
Exception
-
removeBinding
Description copied from interface:AddressManagerThis will use a Transaction as we need to confirm the queue was removed- Specified by:
removeBindingin interfaceAddressManager- Throws:
Exception
-
getExistingBindingsForRoutingAddress
- Specified by:
getExistingBindingsForRoutingAddressin interfaceAddressManager- Throws:
Exception
-
getBindingsForRoutingAddress
- Specified by:
getBindingsForRoutingAddressin interfaceAddressManager- Throws:
Exception
-
getBinding
- Specified by:
getBindingin interfaceAddressManager
-
getBindings
- Specified by:
getBindingsin interfaceAddressManager
-
getMatchingBindings
- Specified by:
getMatchingBindingsin interfaceAddressManager- Throws:
Exception
-
getDirectBindings
- Specified by:
getDirectBindingsin interfaceAddressManager- Throws:
Exception
-
getMatchingQueue
public SimpleString getMatchingQueue(SimpleString address, RoutingType routingType) throws Exception - Specified by:
getMatchingQueuein interfaceAddressManager- Throws:
Exception
-
getMatchingQueue
public SimpleString getMatchingQueue(SimpleString address, SimpleString queueName, RoutingType routingType) throws Exception - Specified by:
getMatchingQueuein interfaceAddressManager- Throws:
Exception
-
clear
public void clear()- Specified by:
clearin interfaceAddressManager
-
getAddresses
- Specified by:
getAddressesin interfaceAddressManager
-
removeBindingInternal
-
bindingsEmpty
-
addMappingsInternal
protected Bindings addMappingsInternal(SimpleString address, Collection<Binding> newBindings) throws Exception - Throws:
Exception
-
addMappingInternal
- Throws:
Exception
-
reloadAddressInfo
- Specified by:
reloadAddressInfoin interfaceAddressManager
-
addAddressInfo
Description copied from interface:AddressManagerReturnstrueif the address was added, false if it wasn't added.- Specified by:
addAddressInfoin interfaceAddressManager- Returns:
trueif the address was added, false if it wasn't added- Throws:
Exception
-
updateAddressInfo
public AddressInfo updateAddressInfo(SimpleString addressName, EnumSet<RoutingType> routingTypes) throws Exception Description copied from interface:AddressManagerUpdate the specifiedAddressInfo- Specified by:
updateAddressInfoin interfaceAddressManager- Returns:
- the updated
AddressInfoornullif there are no updates - Throws:
Exception- if the address doesn't exist
-
checkAutoRemoveAddress
public boolean checkAutoRemoveAddress(AddressInfo addressInfo, AddressSettings settings, boolean ignoreDelay) throws Exception - Specified by:
checkAutoRemoveAddressin interfaceAddressManager- Throws:
Exception
-
removeAddressInfo
- Specified by:
removeAddressInfoin interfaceAddressManager- Throws:
Exception
-
getAddressInfo
- Specified by:
getAddressInfoin interfaceAddressManager
-
scanAddresses
- Specified by:
scanAddressesin interfaceAddressManager- Throws:
Exception
-