Interface PagedMessage
-
- All Superinterfaces:
EncodingSupport
- All Known Implementing Classes:
PagedMessageImpl
public interface PagedMessage extends EncodingSupport
A Paged message.We can't just record the ServerMessage as we need other information (such as the TransactionID used during paging)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MessagegetMessage()intgetMessageNumber()longgetPageNumber()longgetPersistentSize()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 sizelong[]getQueueIDs()The queues that were routed during pagingintgetStoredSize()This returns how much the PagedMessage used, or it's going to use from storage.longgetTransactionID()voidinitMessage(StorageManager storageManager)PagePositionnewPositionObject()PagedMessagesetMessageNumber(int messageNr)PagedMessagesetPageNumber(long pageNr)-
Methods inherited from interface org.apache.activemq.artemis.core.journal.EncodingSupport
decode, encode, getEncodeSize
-
-
-
-
Method Detail
-
getMessage
Message getMessage()
-
newPositionObject
PagePosition newPositionObject()
-
getQueueIDs
long[] getQueueIDs()
The queues that were routed during paging
-
initMessage
void initMessage(StorageManager storageManager)
-
getTransactionID
long getTransactionID()
-
getPersistentSize
long getPersistentSize() throws ActiveMQExceptionThis 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- Returns:
- 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
PagedMessage setPageNumber(long pageNr)
-
getMessageNumber
int getMessageNumber()
-
setMessageNumber
PagedMessage setMessageNumber(int messageNr)
-
-