org.apache.qpid.server.virtualhost.plugins
Class ConfiguredQueueBindingListener
java.lang.Object
org.apache.qpid.server.virtualhost.plugins.ConfiguredQueueBindingListener
- All Implemented Interfaces:
- Exchange.BindingListener
public class ConfiguredQueueBindingListener
- extends Object
- implements Exchange.BindingListener
This is a listener that caches queues that are configured for slow consumer disconnection.
There should be one listener per virtual host, which can be added to all exchanges on
that host.
TODO In future, it will be possible to configure the policy at runtime, so only the queue
itself is cached, and the configuration looked up by the housekeeping thread. This means
that there may be occasions where the copy of the cache contents retrieved by the thread
does not contain queues that are configured, or that configured queues are not present.
- See Also:
Exchange.BindingListener
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConfiguredQueueBindingListener
public ConfiguredQueueBindingListener(String vhostName)
bindingAdded
public void bindingAdded(Exchange exchange,
Binding binding)
- Specified by:
bindingAdded
in interface Exchange.BindingListener
- See Also:
Exchange.BindingListener.bindingAdded(Exchange, Binding)
bindingRemoved
public void bindingRemoved(Exchange exchange,
Binding binding)
- Specified by:
bindingRemoved
in interface Exchange.BindingListener
- See Also:
Exchange.BindingListener.bindingRemoved(Exchange, Binding)
getQueueCache
public Set<AMQQueue> getQueueCache()
- Lookup and return the cache of configured
AMQQueue
s.
Note that when accessing the cached queues, the Iterator
is not thread safe
(see the Collections.synchronizedSet(Set)
documentation) so a copy of the
cache is returned.
- Returns:
- a copy of the cached
Set
of queues
Licensed to the Apache Software Foundation