Interface PagedMessage
- All Superinterfaces:
EncodingSupport
- All Known Implementing Classes:
PagedMessageImpl
A Paged message.
We can't just record the ServerMessage as we need other information (such as the TransactionID used during paging)
-
Method Summary
Modifier and TypeMethodDescriptionintlonglongThis is the size of the message when persisted on disk and is used for metrics tracking If a normal message it will be the encoded message size If a large message it will be encoded message size + large message body sizelong[]The queues that were routed during pagingintThis returns how much the PagedMessage used, or it's going to use from storage.longvoidinitMessage(StorageManager storageManager) setMessageNumber(int messageNr) setPageNumber(long pageNr) Methods inherited from interface org.apache.activemq.artemis.core.journal.EncodingSupport
decode, encode, getEncodeSize
-
Method Details
-
getMessage
Message getMessage() -
newPositionObject
PagePosition newPositionObject() -
getQueueIDs
long[] getQueueIDs()The queues that were routed during paging -
initMessage
-
getTransactionID
long getTransactionID() -
getPersistentSize
This is the size of the message when persisted on disk and is used for metrics tracking If a normal message it will be the encoded message size If a large message it will be encoded message size + large message body size- Throws:
ActiveMQException
-
getStoredSize
int getStoredSize()This returns how much the PagedMessage used, or it's going to use from storage. We can't calculate the encodeSize as some persisters don't guarantee to re-store the data at the same amount of bytes it used. In some cases it may need to add headers in AMQP or extra data that may affect the outcome of getEncodeSize() -
getPageNumber
long getPageNumber() -
setPageNumber
-
getMessageNumber
int getMessageNumber() -
setMessageNumber
-