Class Redistributor
- java.lang.Object
-
- org.apache.activemq.artemis.core.server.cluster.impl.Redistributor
-
- All Implemented Interfaces:
PriorityAware,Consumer
public class Redistributor extends Object implements Consumer
-
-
Constructor Summary
Constructors Constructor Description Redistributor(Queue queue, StorageManager storageManager, PostOffice postOffice)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Stringdebug()voiddisconnect()disconnect the consumerList<MessageReference>getDeliveringMessages()FiltergetFilter()HandleStatushandle(MessageReference reference)There was a change on semantic during 2.3 here.
We now first accept the message, and the actual deliver is done as part ofConsumer.proceedDeliver(MessageReference).voidproceedDeliver(MessageReference ref)This will proceed with the actual delivery.longsequentialID()an unique sequential ID for this consumervoidstart()voidstop()StringtoManagementString()This method will create a string representation meant for management operations.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.activemq.artemis.core.server.Consumer
errorProcessing, getBinding, getPriority, promptDelivery, supportsDirectDelivery
-
-
-
-
Constructor Detail
-
Redistributor
public Redistributor(Queue queue, StorageManager storageManager, PostOffice postOffice)
-
-
Method Detail
-
sequentialID
public long sequentialID()
Description copied from interface:Consumeran unique sequential ID for this consumer- Specified by:
sequentialIDin interfaceConsumer
-
toManagementString
public String toManagementString()
Description copied from interface:ConsumerThis method will create a string representation meant for management operations. This is different from the toString method that's meant for debugging and will contain information that regular users won't understand well- Specified by:
toManagementStringin interfaceConsumer- Returns:
-
disconnect
public void disconnect()
Description copied from interface:Consumerdisconnect the consumer- Specified by:
disconnectin interfaceConsumer
-
start
public void start()
-
close
public void close()
-
handle
public HandleStatus handle(MessageReference reference) throws Exception
Description copied from interface:ConsumerThere was a change on semantic during 2.3 here.
We now first accept the message, and the actual deliver is done as part ofConsumer.proceedDeliver(MessageReference). This is to avoid holding a lock on the queues while the delivery is being accomplished To avoid a lock on the queue in case of misbehaving consumers.This should return busy if handle is called before proceed deliver is called
-
proceedDeliver
public void proceedDeliver(MessageReference ref)
Description copied from interface:ConsumerThis will proceed with the actual delivery. Notice that handle should hold a readLock and proceedDelivery should release the readLock any lock operation on Consumer should also get a writeLock on the readWriteLock to guarantee there are no pending deliveries- Specified by:
proceedDeliverin interfaceConsumer
-
getDeliveringMessages
public List<MessageReference> getDeliveringMessages()
- Specified by:
getDeliveringMessagesin interfaceConsumer- Returns:
- the list of messages being delivered
-
-