Class AbstractProtocolReference
java.lang.Object
org.apache.activemq.artemis.utils.collections.LinkedListImpl.Node<MessageReferenceImpl>
org.apache.activemq.artemis.core.server.impl.AbstractProtocolReference
- All Implemented Interfaces:
MessageReference
- Direct Known Subclasses:
MessageReferenceImpl,PagedReferenceImpl
public abstract class AbstractProtocolReference
extends LinkedListImpl.Node<MessageReferenceImpl>
implements MessageReference
I need to store protocol specific data on the references. The same need exists in both PagedReference and
MessageReferenceImpl. This class will serve the purpose to keep the specific protocol data for either reference.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.activemq.artemis.core.server.MessageReference
MessageReference.Factory -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> TgetProtocolData(Class<T> classType) To be used on holding protocol specific data during the delivery.long<T> voidsetProtocolData(Class<T> classType, T protocolData) To be used on holding protocol specific data during the delivery.voidsetSequence(long nextSequence) Methods inherited from class org.apache.activemq.artemis.utils.collections.LinkedListImpl.Node
next, prev, toString, valMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.activemq.artemis.core.server.MessageReference
acknowledge, acknowledge, acknowledge, acknowledge, acknowledge, copy, decrementDeliveryCount, emptyConsumerID, getConsumerId, getDeliveryCount, getLastValueProperty, getMessage, getMessageID, getMessageMemoryEstimate, getPersistedCount, getPersistentSize, getQueue, getScheduledDeliveryTime, handled, hasConsumerId, incrementDeliveryCount, isAlreadyAcked, isDurable, isInDelivery, isPaged, onDelivery, setAlreadyAcked, setConsumerId, setDeliveryCount, setInDelivery, setPersistedCount, setScheduledDeliveryTime, skipDelivery
-
Field Details
-
sequence
protected volatile long sequence
-
-
Constructor Details
-
AbstractProtocolReference
public AbstractProtocolReference()
-
-
Method Details
-
getProtocolData
Description copied from interface:MessageReferenceTo be used on holding protocol specific data during the delivery. This will be only valid while the message is on the delivering queue at the consumer- Specified by:
getProtocolDatain interfaceMessageReference
-
setProtocolData
Description copied from interface:MessageReferenceTo be used on holding protocol specific data during the delivery. This will be only valid while the message is on the delivering queue at the consumer- Specified by:
setProtocolDatain interfaceMessageReference
-
getSequence
public long getSequence()- Specified by:
getSequencein interfaceMessageReference
-
setSequence
public void setSequence(long nextSequence) - Specified by:
setSequencein interfaceMessageReference
-