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.
|
PagingStore |
getOwner() |
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 |
isInDelivery() |
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 |
setInDelivery(boolean inDelivery) |
void |
setOwner(PagingStore owner) |
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 MessageReference
public boolean isPaged()
isPaged
in interface MessageReference
public long getMessageID()
getMessageID
in interface MessageReference
public boolean isDurable()
isDurable
in interface MessageReference
public SimpleString getLastValueProperty()
getLastValueProperty
in interface MessageReference
public void onDelivery(Consumer<? super MessageReference> callback)
MessageReference
onDelivery
in interface MessageReference
public int getMessageMemoryEstimate()
MessageReference
getMessageMemoryEstimate
in interface MessageReference
public Object getProtocolData()
MessageReference
getProtocolData
in interface MessageReference
public void setProtocolData(Object data)
MessageReference
setProtocolData
in interface MessageReference
public MessageReference copy(Queue queue)
copy
in interface MessageReference
public long getScheduledDeliveryTime()
getScheduledDeliveryTime
in interface MessageReference
public void setScheduledDeliveryTime(long scheduledDeliveryTime)
setScheduledDeliveryTime
in interface MessageReference
public int getDeliveryCount()
getDeliveryCount
in interface MessageReference
public void setDeliveryCount(int deliveryCount)
setDeliveryCount
in interface MessageReference
public void setPersistedCount(int deliveryCount)
setPersistedCount
in interface MessageReference
public int getPersistedCount()
getPersistedCount
in interface MessageReference
public void incrementDeliveryCount()
incrementDeliveryCount
in interface MessageReference
public void decrementDeliveryCount()
decrementDeliveryCount
in interface MessageReference
public Queue getQueue()
getQueue
in interface MessageReference
public void acknowledge() throws Exception
acknowledge
in interface MessageReference
Exception
public void acknowledge(Transaction tx) throws Exception
acknowledge
in interface MessageReference
Exception
public void acknowledge(Transaction tx, ServerConsumer consumer) throws Exception
acknowledge
in interface MessageReference
Exception
public void acknowledge(Transaction tx, AckReason reason, ServerConsumer consumer) throws Exception
acknowledge
in interface MessageReference
Exception
public void emptyConsumerID()
emptyConsumerID
in interface MessageReference
public void setConsumerId(long consumerID)
setConsumerId
in interface MessageReference
public boolean hasConsumerId()
hasConsumerId
in interface MessageReference
public long getConsumerId()
getConsumerId
in interface MessageReference
public void handled()
handled
in interface MessageReference
public void setInDelivery(boolean inDelivery)
setInDelivery
in interface MessageReference
public boolean isInDelivery()
isInDelivery
in interface MessageReference
public void setAlreadyAcked()
setAlreadyAcked
in interface MessageReference
public boolean isAlreadyAcked()
isAlreadyAcked
in interface MessageReference
public long getPersistentSize() throws ActiveMQException
MessageReference
getPersistentSize
in interface MessageReference
ActiveMQException
public PagingStore getOwner()
getOwner
in interface MessageReference
public void setOwner(PagingStore owner)
setOwner
in interface MessageReference
Copyright © 2021 JBoss by Red Hat. All rights reserved.