public class GroupFirstMessageReference extends Object implements MessageReference
MessageReference.Factory| Constructor and Description |
|---|
GroupFirstMessageReference(SimpleString key,
MessageReference messageReference) |
| Modifier and Type | Method and Description |
|---|---|
void |
acknowledge() |
void |
acknowledge(Transaction tx) |
void |
acknowledge(Transaction tx,
AckReason reason,
ServerConsumer consumer) |
void |
acknowledge(Transaction tx,
ServerConsumer consumer) |
MessageReference |
copy(Queue queue) |
void |
decrementDeliveryCount() |
void |
emptyConsumerID() |
long |
getConsumerId() |
int |
getDeliveryCount() |
SimpleString |
getLastValueProperty() |
Message |
getMessage() |
long |
getMessageID() |
int |
getMessageMemoryEstimate()
We define this method aggregation here because on paging we need to hold the original estimate,
so we need to perform some extra steps on paging.
|
int |
getPersistedCount() |
long |
getPersistentSize()
This is the size of the message when persisted on disk which is used for metrics tracking
Note that even if the message itself is not persisted on disk (ie non-durable) this value is
still used for metrics tracking for the amount of data on a queue
|
Object |
getProtocolData()
To be used on holding protocol specific data during the delivery.
|
Queue |
getQueue() |
long |
getScheduledDeliveryTime() |
void |
handled() |
boolean |
hasConsumerId() |
void |
incrementDeliveryCount() |
boolean |
isAlreadyAcked() |
boolean |
isDurable() |
boolean |
isPaged() |
void |
onDelivery(Consumer<? super MessageReference> callback)
This is to be used in cases where a message delivery happens on an executor.
|
void |
setAlreadyAcked() |
void |
setConsumerId(long consumerID) |
void |
setDeliveryCount(int deliveryCount) |
void |
setPersistedCount(int deliveryCount) |
void |
setProtocolData(Object data)
To be used on holding protocol specific data during the delivery.
|
void |
setScheduledDeliveryTime(long scheduledDeliveryTime) |
public GroupFirstMessageReference(SimpleString key, MessageReference messageReference)
public Message getMessage()
getMessage in interface MessageReferencepublic boolean isPaged()
isPaged in interface MessageReferencepublic long getMessageID()
getMessageID in interface MessageReferencepublic boolean isDurable()
isDurable in interface MessageReferencepublic SimpleString getLastValueProperty()
getLastValueProperty in interface MessageReferencepublic void onDelivery(Consumer<? super MessageReference> callback)
MessageReferenceonDelivery in interface MessageReferencepublic int getMessageMemoryEstimate()
MessageReferencegetMessageMemoryEstimate in interface MessageReferencepublic Object getProtocolData()
MessageReferencegetProtocolData in interface MessageReferencepublic void setProtocolData(Object data)
MessageReferencesetProtocolData in interface MessageReferencepublic MessageReference copy(Queue queue)
copy in interface MessageReferencepublic long getScheduledDeliveryTime()
getScheduledDeliveryTime in interface MessageReferencepublic void setScheduledDeliveryTime(long scheduledDeliveryTime)
setScheduledDeliveryTime in interface MessageReferencepublic int getDeliveryCount()
getDeliveryCount in interface MessageReferencepublic void setDeliveryCount(int deliveryCount)
setDeliveryCount in interface MessageReferencepublic void setPersistedCount(int deliveryCount)
setPersistedCount in interface MessageReferencepublic int getPersistedCount()
getPersistedCount in interface MessageReferencepublic void incrementDeliveryCount()
incrementDeliveryCount in interface MessageReferencepublic void decrementDeliveryCount()
decrementDeliveryCount in interface MessageReferencepublic Queue getQueue()
getQueue in interface MessageReferencepublic void acknowledge()
throws Exception
acknowledge in interface MessageReferenceExceptionpublic void acknowledge(Transaction tx) throws Exception
acknowledge in interface MessageReferenceExceptionpublic void acknowledge(Transaction tx, ServerConsumer consumer) throws Exception
acknowledge in interface MessageReferenceExceptionpublic void acknowledge(Transaction tx, AckReason reason, ServerConsumer consumer) throws Exception
acknowledge in interface MessageReferenceExceptionpublic void emptyConsumerID()
emptyConsumerID in interface MessageReferencepublic void setConsumerId(long consumerID)
setConsumerId in interface MessageReferencepublic boolean hasConsumerId()
hasConsumerId in interface MessageReferencepublic long getConsumerId()
getConsumerId in interface MessageReferencepublic void handled()
handled in interface MessageReferencepublic void setAlreadyAcked()
setAlreadyAcked in interface MessageReferencepublic boolean isAlreadyAcked()
isAlreadyAcked in interface MessageReferencepublic long getPersistentSize()
throws ActiveMQException
MessageReferencegetPersistentSize in interface MessageReferenceActiveMQExceptionCopyright © 2019 JBoss by Red Hat. All rights reserved.