public final class LargeServerMessageImpl extends ServerMessageImpl implements LargeServerMessage
address, BODY_OFFSET, bodyBuffer, buffer, BUFFER_HEADER_SPACE, bufferValid, durable, HDR_BRIDGE_DUPLICATE_ID, HDR_ROUTE_TO_ACK_IDS, HDR_ROUTE_TO_IDS, HDR_SCALEDOWN_TO_IDS, messageID, priority, properties, timestamp, typeBYTES_TYPE, DEFAULT_TYPE, HDR_ACTUAL_EXPIRY_TIME, HDR_CONTENT_TYPE, HDR_DUPLICATE_DETECTION_ID, HDR_GROUP_ID, HDR_LARGE_BODY_SIZE, HDR_LARGE_COMPRESSED, HDR_LAST_VALUE_NAME, HDR_ORIG_MESSAGE_ID, HDR_ORIGINAL_ADDRESS, HDR_ORIGINAL_QUEUE, HDR_SCHEDULED_DELIVERY_TIME, HDR_VALIDATED_USER, MAP_TYPE, OBJECT_TYPE, STREAM_TYPE, TEXT_TYPE| Constructor and Description |
|---|
LargeServerMessageImpl(JournalStorageManager storageManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBytes(byte[] bytes) |
protected void |
closeFile() |
ServerMessage |
copy() |
ServerMessage |
copy(long newID) |
protected org.apache.activemq.artemis.core.io.SequentialFile |
createFile() |
void |
decode(org.apache.activemq.artemis.api.core.ActiveMQBuffer buffer1) |
void |
decrementDelayDeletionCount() |
int |
decrementRefCount() |
void |
deleteFile() |
void |
encode(org.apache.activemq.artemis.api.core.ActiveMQBuffer buffer1) |
void |
encodeBody(org.apache.activemq.artemis.api.core.ActiveMQBuffer bufferOut,
org.apache.activemq.artemis.core.message.BodyEncoder context,
int size) |
protected void |
finalize() |
org.apache.activemq.artemis.core.message.BodyEncoder |
getBodyEncoder() |
int |
getEncodeSize() |
org.apache.activemq.artemis.core.io.SequentialFile |
getFile() |
int |
getMemoryEstimate() |
long |
getPendingRecordID() |
void |
incrementDelayDeletionCount() |
boolean |
isLargeMessage() |
protected void |
openFile() |
void |
releaseResources()
Close the files if opened
|
void |
setOriginalHeaders(ServerMessage other,
MessageReference originalReference,
boolean expiry) |
void |
setPaged()
We have to copy the large message content in case of DLQ and paged messages
For that we need to pre-mark the LargeMessage with a flag when it is paged
|
void |
setPendingRecordID(long pendingRecordID) |
String |
toString() |
void |
validateFile() |
createReference, decrementDurableRefCount, encodeMessageIDToBuffer, forceAddress, getBodyInputStream, getDuplicateIDBytes, getDuplicateProperty, getPagingStore, getRefCount, hasInternalProperties, incrementDurableRefCount, incrementRefCount, isServerMessage, makeCopyForExpiryOrDLA, makeCopyForExpiryOrDLA, setMessageID, setPagingStore, storeIsPagingbodyChanged, bodyToString, checkCompletion, containsProperty, containsProperty, copyHeadersAndProperties, createBody, decodeFromBuffer, decodeHeadersAndProperties, encodeHeadersAndProperties, equals, getAddress, getBodyBuffer, getBodyBufferDuplicate, getBooleanProperty, getBooleanProperty, getByteProperty, getByteProperty, getBytesProperty, getBytesProperty, getDoubleProperty, getDoubleProperty, getEncodedBuffer, getEndOfBodyPosition, getEndOfMessagePosition, getExpiration, getFloatProperty, getFloatProperty, getHeadersAndPropertiesEncodeSize, getIntProperty, getIntProperty, getLongProperty, getLongProperty, getMessageID, getObjectProperty, getObjectProperty, getPriority, getProperties, getPropertyNames, getShortProperty, getShortProperty, getSimpleStringProperty, getSimpleStringProperty, getStringProperty, getStringProperty, getTimestamp, getType, getTypedProperties, getUserID, getWholeBuffer, hashCode, isDurable, isExpired, putBooleanProperty, putBooleanProperty, putByteProperty, putByteProperty, putBytesProperty, putBytesProperty, putCharProperty, putCharProperty, putDoubleProperty, putDoubleProperty, putFloatProperty, putFloatProperty, putIntProperty, putIntProperty, putLongProperty, putLongProperty, putObjectProperty, putObjectProperty, putShortProperty, putShortProperty, putStringProperty, putStringProperty, putTypedProperties, removeProperty, removeProperty, setAddress, setAddressTransient, setDurable, setExpiration, setPriority, setTimestamp, setType, setUserID, toMap, toPropertyMap, writeBodyBufferBytes, writeBodyBufferStringcreateReference, decrementDurableRefCount, encodeMessageIDToBuffer, forceAddress, getDuplicateIDBytes, getDuplicateProperty, getPagingStore, getRefCount, hasInternalProperties, incrementDurableRefCount, incrementRefCount, makeCopyForExpiryOrDLA, setMessageID, setPagingStore, storeIsPagingbodyChanged, decodeFromBuffer, decodeHeadersAndProperties, encodeHeadersAndProperties, getBodyInputStream, getEncodedBuffer, getEndOfBodyPosition, getEndOfMessagePosition, getHeadersAndPropertiesEncodeSize, getTypedProperties, getWholeBuffer, isServerMessage, setAddressTransientcontainsProperty, containsProperty, getAddress, getBodyBuffer, getBodyBufferDuplicate, getBooleanProperty, getBooleanProperty, getByteProperty, getByteProperty, getBytesProperty, getBytesProperty, getDoubleProperty, getDoubleProperty, getExpiration, getFloatProperty, getFloatProperty, getIntProperty, getIntProperty, getLongProperty, getLongProperty, getMessageID, getObjectProperty, getObjectProperty, getPriority, getPropertyNames, getShortProperty, getShortProperty, getSimpleStringProperty, getSimpleStringProperty, getStringProperty, getStringProperty, getTimestamp, getType, getUserID, isDurable, isExpired, putBooleanProperty, putBooleanProperty, putByteProperty, putByteProperty, putBytesProperty, putBytesProperty, putCharProperty, putCharProperty, putDoubleProperty, putDoubleProperty, putFloatProperty, putFloatProperty, putIntProperty, putIntProperty, putLongProperty, putLongProperty, putObjectProperty, putObjectProperty, putShortProperty, putShortProperty, putStringProperty, putStringProperty, removeProperty, removeProperty, setAddress, setDurable, setExpiration, setPriority, setTimestamp, setUserID, toMap, toPropertyMap, writeBodyBufferBytes, writeBodyBufferStringsetDurable, setMessageIDpublic LargeServerMessageImpl(JournalStorageManager storageManager)
public void setPendingRecordID(long pendingRecordID)
setPendingRecordID in interface LargeServerMessagependingRecordID - public long getPendingRecordID()
getPendingRecordID in interface LargeServerMessagepublic void setPaged()
LargeServerMessagesetPaged in interface LargeServerMessagepublic void addBytes(byte[] bytes)
throws Exception
addBytes in interface ReplicatedLargeMessageaddBytes in interface LargeServerMessageExceptionLargeServerMessage.addBytes(byte[])public void encodeBody(org.apache.activemq.artemis.api.core.ActiveMQBuffer bufferOut,
org.apache.activemq.artemis.core.message.BodyEncoder context,
int size)
public int getEncodeSize()
getEncodeSize in interface org.apache.activemq.artemis.api.core.MessagegetEncodeSize in interface org.apache.activemq.artemis.core.journal.EncodingSupportgetEncodeSize in class org.apache.activemq.artemis.core.message.impl.MessageImplpublic void encode(org.apache.activemq.artemis.api.core.ActiveMQBuffer buffer1)
encode in interface org.apache.activemq.artemis.core.journal.EncodingSupportencode in class org.apache.activemq.artemis.core.message.impl.MessageImplpublic void decode(org.apache.activemq.artemis.api.core.ActiveMQBuffer buffer1)
decode in interface org.apache.activemq.artemis.core.journal.EncodingSupportdecode in class org.apache.activemq.artemis.core.message.impl.MessageImplpublic void incrementDelayDeletionCount()
incrementDelayDeletionCount in interface LargeServerMessagepublic void decrementDelayDeletionCount()
throws Exception
decrementDelayDeletionCount in interface LargeServerMessageExceptionpublic org.apache.activemq.artemis.core.message.BodyEncoder getBodyEncoder()
throws org.apache.activemq.artemis.api.core.ActiveMQException
getBodyEncoder in interface org.apache.activemq.artemis.core.message.impl.MessageInternalgetBodyEncoder in class org.apache.activemq.artemis.core.message.impl.MessageImplorg.apache.activemq.artemis.api.core.ActiveMQExceptionpublic int decrementRefCount()
throws Exception
decrementRefCount in interface ServerMessagedecrementRefCount in class ServerMessageImplExceptionpublic boolean isLargeMessage()
isLargeMessage in interface org.apache.activemq.artemis.api.core.MessageisLargeMessage in class ServerMessageImplpublic void deleteFile()
throws Exception
deleteFile in interface ReplicatedLargeMessagedeleteFile in interface LargeServerMessageExceptionLargeServerMessage.deleteFile()public int getMemoryEstimate()
getMemoryEstimate in interface ServerMessagegetMemoryEstimate in class ServerMessageImplpublic void releaseResources()
LargeServerMessagereleaseResources in interface ReplicatedLargeMessagereleaseResources in interface LargeServerMessageLargeServerMessage.releaseResources()public void setOriginalHeaders(ServerMessage other, MessageReference originalReference, boolean expiry)
setOriginalHeaders in interface ServerMessagesetOriginalHeaders in class ServerMessageImplpublic ServerMessage copy()
copy in interface ServerMessagecopy in class ServerMessageImplpublic ServerMessage copy(long newID)
copy in interface ServerMessagecopy in class ServerMessageImplpublic org.apache.activemq.artemis.core.io.SequentialFile getFile()
throws org.apache.activemq.artemis.api.core.ActiveMQException
getFile in interface LargeServerMessageorg.apache.activemq.artemis.api.core.ActiveMQExceptionpublic String toString()
toString in class ServerMessageImplprotected void finalize()
throws Throwable
public void validateFile()
throws org.apache.activemq.artemis.api.core.ActiveMQException
org.apache.activemq.artemis.api.core.ActiveMQExceptionprotected org.apache.activemq.artemis.core.io.SequentialFile createFile()
Copyright © 2023 The Apache Software Foundation. All rights reserved.