public class PagedReferenceImpl extends LinkedListImpl.Node<PagedReferenceImpl> implements PagedReference, Runnable
MessageReference.Factory| Constructor and Description |
|---|
PagedReferenceImpl(PagePosition position,
PagedMessage message,
PageSubscription subscription) |
| 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) |
void |
addPendingFlag()
this method affects paging clean up
It adds to the flag that prevents its page from cleanup.
|
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.
|
PagedMessage |
getPagedMessage() |
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
|
PagePosition |
getPosition() |
Object |
getProtocolData()
To be used on holding protocol specific data during the delivery.
|
Queue |
getQueue() |
long |
getScheduledDeliveryTime() |
long |
getTransactionID() |
void |
handled() |
boolean |
hasConsumerId() |
void |
incrementDeliveryCount() |
boolean |
isAlreadyAcked() |
boolean |
isDurable() |
boolean |
isLargeMessage() |
boolean |
isPaged() |
void |
onDelivery(Consumer<? super MessageReference> onDelivery)
This is to be used in cases where a message delivery happens on an executor.
|
void |
removePendingFlag()
this method affects paging clean up
It adds to the flag that prevents its page from cleanup.
|
void |
run()
It will call
Consumer.accept(Object) on this of the Consumer registered in onDelivery(Consumer), if any. |
void |
setAlreadyAcked() |
void |
setConsumerId(long consumerID) |
void |
setDeliveryCount(int deliveryCount) |
void |
setPersistedCount(int count) |
void |
setProtocolData(Object protocolData)
To be used on holding protocol specific data during the delivery.
|
void |
setScheduledDeliveryTime(long scheduledDeliveryTime) |
String |
toString() |
valpublic PagedReferenceImpl(PagePosition position, PagedMessage message, PageSubscription subscription)
public Object getProtocolData()
MessageReferencegetProtocolData in interface MessageReferencepublic void setProtocolData(Object protocolData)
MessageReferencesetProtocolData in interface MessageReferencepublic Message getMessage()
getMessage in interface MessageReferencepublic void onDelivery(Consumer<? super MessageReference> onDelivery)
MessageReferenceonDelivery in interface MessageReferencepublic void run()
Consumer.accept(Object) on this of the Consumer registered in onDelivery(Consumer), if any.public PagedMessage getPagedMessage()
getPagedMessage in interface PagedReferencepublic PagePosition getPosition()
getPosition in interface PagedReferencepublic boolean isPaged()
isPaged in interface MessageReferencepublic void setPersistedCount(int count)
setPersistedCount in interface MessageReferencepublic int getPersistedCount()
getPersistedCount in interface MessageReferencepublic int getMessageMemoryEstimate()
MessageReferencegetMessageMemoryEstimate 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 incrementDeliveryCount()
incrementDeliveryCount in interface MessageReferencepublic void decrementDeliveryCount()
decrementDeliveryCount in interface MessageReferencepublic Queue getQueue()
getQueue in interface MessageReferencepublic void handled()
handled in interface MessageReferencepublic void setAlreadyAcked()
setAlreadyAcked in interface MessageReferencepublic boolean isAlreadyAcked()
isAlreadyAcked 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 String toString()
toString in class LinkedListImpl.Node<PagedReferenceImpl>public 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 boolean isLargeMessage()
isLargeMessage in interface PagedReferencepublic long getTransactionID()
getTransactionID in interface PagedReferencepublic void addPendingFlag()
PagedReferencePageSubscription.addPendingDelivery(PagePosition)addPendingFlag in interface PagedReferencePageSubscription.addPendingDelivery(PagePosition)public void removePendingFlag()
PagedReferencePageSubscription.addPendingDelivery(PagePosition)removePendingFlag in interface PagedReferencePageSubscription.addPendingDelivery(PagePosition)public long getMessageID()
getMessageID in interface MessageReferencepublic SimpleString getLastValueProperty()
getLastValueProperty in interface MessageReferencepublic long getPersistentSize()
MessageReferencegetPersistentSize in interface MessageReferencepublic boolean isDurable()
isDurable in interface MessageReferenceCopyright © 2019 JBoss by Red Hat. All rights reserved.