public class AMQPLargeMessage extends AMQPMessage implements LargeServerMessage
AMQPMessage.MessageDataScanningStatusaddress, ADDRESS_PROPERTY, applicationProperties, applicationPropertiesPosition, connectionID, coreMessageObjectPools, DEFAULT_MESSAGE_FORMAT, DEFAULT_MESSAGE_PRIORITY, deliveryAnnotations, deliveryAnnotationsForSendBuffer, deliveryAnnotationsPosition, encodedDeliveryAnnotationsSize, encodedHeaderSize, expiration, expirationReload, extraProperties, header, headerPosition, logger, MAX_MESSAGE_PRIORITY, memoryEstimate, messageAnnotations, messageAnnotationsPosition, messageDataScanned, messageFormat, messageID, modified, properties, propertiesPosition, rejectedConsumers, remainingBodyPosition, scheduledTime, VALUE_NOT_PRESENTBYTES_TYPE, DEFAULT_TYPE, EMBEDDED_TYPE, HDR_ACTUAL_EXPIRY_TIME, HDR_BRIDGE_DUPLICATE_ID, HDR_CONTENT_TYPE, HDR_DUPLICATE_DETECTION_ID, HDR_GROUP_ID, HDR_GROUP_SEQUENCE, HDR_INGRESS_TIMESTAMP, HDR_LARGE_BODY_SIZE, HDR_LARGE_COMPRESSED, HDR_LAST_VALUE_NAME, HDR_ORIG_MESSAGE_ID, HDR_ORIGINAL_ADDRESS, HDR_ORIGINAL_QUEUE, HDR_PREFIX, HDR_ROUTE_TO_ACK_IDS, HDR_ROUTE_TO_IDS, HDR_ROUTING_TYPE, HDR_SCALEDOWN_TO_IDS, HDR_SCHEDULED_DELIVERY_TIME, HDR_VALIDATED_USER, INTERNAL_PROPERTY_NAMES_PREDICATE, LARGE_EMBEDDED_TYPE, MAP_TYPE, memoryOffset, OBJECT_TYPE, STREAM_TYPE, TEXT_TYPE| Constructor and Description |
|---|
AMQPLargeMessage(long id,
long messageFormat,
TypedProperties extraProperties,
CoreMessageObjectPools coreMessageObjectPools,
StorageManager storageManager) |
AMQPLargeMessage(long id,
long messageFormat,
TypedProperties extraProperties,
CoreMessageObjectPools coreMessageObjectPools,
StorageManager storageManager,
org.apache.activemq.artemis.core.persistence.impl.journal.LargeBody largeBody) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBytes(ActiveMQBuffer bytes,
boolean initialHeader) |
void |
addBytes(byte[] bytes) |
void |
addBytes(org.apache.qpid.proton.codec.ReadableBuffer data) |
void |
checkReference(MessageReference reference)
This method check the reference for specifics on protocolData.
|
void |
clearPendingRecordID() |
void |
closeLargeMessage() |
Message |
copy() |
Message |
copy(long newID) |
Message |
copy(long newID,
boolean isDLQOrExpiry) |
void |
deleteFile() |
protected void |
encodeMessage() |
protected void |
ensureDataIsValid() |
SequentialFile |
getAppendFile() |
org.apache.qpid.proton.codec.ReadableBuffer |
getData() |
int |
getEncodeSize() |
org.apache.activemq.artemis.core.persistence.impl.journal.LargeBody |
getLargeBody() |
org.apache.activemq.artemis.core.message.LargeBodyReader |
getLargeBodyReader() |
int |
getMemoryEstimate() |
long |
getPendingRecordID() |
long |
getPersistentSize() |
Persister<Message> |
getPersister() |
int |
getPersistSize() |
int |
getPositionAfterDeliveryAnnotations()
during large message deliver, we need this calculation to place a new delivery annotation
|
io.netty.buffer.ByteBuf |
getSavedEncodeBuffer() |
org.apache.qpid.proton.codec.ReadableBuffer |
getSendBuffer(int deliveryCount,
MessageReference reference)
Gets a ByteBuf from the Message that contains the encoded bytes to be sent on the wire.
|
StorageManager |
getStorageManager() |
long |
getWholeMessageSize() |
boolean |
hasPendingRecord() |
io.netty.buffer.ByteBuf |
inspectTemporaryBuffer()
This is used on test assertions to make sure the buffers are released corrected
|
boolean |
isDurable() |
boolean |
isLargeMessage() |
boolean |
isReencoded() |
void |
messageChanged() |
protected io.netty.buffer.ByteBuf |
newHeaderWithoutExpiry(AtomicInteger placeOutput) |
void |
openLargeMessage() |
void |
parseHeader(org.apache.qpid.proton.codec.ReadableBuffer buffer) |
protected void |
parseLargeMessage(ActiveMQBuffer data,
boolean initialHeader) |
protected void |
parseLargeMessage(byte[] data,
boolean initialHeader) |
protected void |
parseLargeMessage(org.apache.qpid.proton.codec.ReadableBuffer data) |
void |
persist(ActiveMQBuffer targetRecord) |
protected void |
readSavedEncoding(io.netty.buffer.ByteBuf buf) |
void |
reencode() |
void |
referenceOriginalMessage(Message original,
String originalQueue) |
protected void |
releaseComplete() |
void |
releaseEncodedBuffer() |
void |
releaseEncodedBufferAfterWrite()
getSavedEncodeBuffer() will retain two counters from the buffer, one meant for the call,
and one that must be released only after encoding. |
void |
releaseResources(boolean sync,
boolean sendEvent) |
void |
reloadPersistence(ActiveMQBuffer record,
CoreMessageObjectPools pools) |
void |
setFileDurable(boolean value) |
void |
setPaged() |
void |
setPendingRecordID(long pendingRecordID) |
void |
setReencoded(boolean reencoded) |
void |
setStorageManager(StorageManager storageManager) |
ICoreMessage |
toCore(CoreMessageObjectPools coreMessageObjectPools) |
Message |
toMessage() |
void |
validateFile() |
acceptsConsumer, cachedAddressSimpleString, clearInternalProperties, containsProperty, containsProperty, createDeliveryCopy, createExtraProperties, ensureMessageDataScanned, ensureScanning, getAddress, getAddressSimpleString, getAMQPUserID, getAnnotation, getApplicationProperties, getApplicationPropertiesMap, getBody, getBooleanProperty, getBooleanProperty, getBrokerProperty, getBuffer, getByteProperty, getByteProperty, getBytesProperty, getBytesProperty, getConnectionID, getCorrelationID, getDataScanningStatus, getDecodedApplicationProperties, getDecodedMessageAnnotations, getDeliveryAnnotations, getDeliveryAnnotationsForSendBufferSize, getDoubleProperty, getDoubleProperty, getDuplicateProperty, getEstimateSavedEncode, getExpiration, getExtraBytesProperty, getExtraProperties, getFloatProperty, getFloatProperty, getFooter, getGroupID, getGroupSequence, getHeader, getIngressTimestamp, getIntProperty, getIntProperty, getLastValueProperty, getLongProperty, getLongProperty, getMessageAnnotation, getMessageAnnotation, getMessageAnnotations, getMessageAnnotationsMap, getMessageFormat, getMessageID, getObjectProperty, getObjectProperty, getObjectPropertyForFilter, getOwner, getPriority, getProperties, getPropertyKeysPool, getPropertyNames, getPropertyValuesPool, getProtonMessage, getReplyTo, getRoutingType, getScheduledDeliveryTime, getShortProperty, getShortProperty, getSimpleStringProperty, getSimpleStringProperty, getStringProperty, getStringProperty, getTimestamp, getUserID, hasScheduledDeliveryTime, internalPersistSize, lazyDecodeApplicationProperties, lazyDecodeApplicationProperties, lazyScanAfterReloadPersistence, putBooleanProperty, putBooleanProperty, putByteProperty, putByteProperty, putBytesProperty, putBytesProperty, putCharProperty, putCharProperty, putDoubleProperty, putDoubleProperty, putExtraBytesProperty, putFloatProperty, putFloatProperty, putIntProperty, putIntProperty, putLongProperty, putLongProperty, putObjectProperty, putObjectProperty, putShortProperty, putShortProperty, putStringProperty, putStringProperty, putStringProperty, receiveBuffer, rejectConsumer, reloadExpiration, removeAnnotation, removeExtraBytesProperty, removeMessageAnnotation, removeProperty, removeProperty, resetMessageData, scanForMessageSection, scanForMessageSection, scanMessageData, scanMessageData, sendBuffer, setAddress, setAddress, setAnnotation, setBrokerProperty, setBuffer, setConnectionID, setCorrelationID, setDeliveryAnnotationsForSendBuffer, setDurable, setExpiration, setExtraProperties, setIngressTimestamp, setLastValueProperty, setMessageAnnotation, setMessageAnnotation, setMessageAnnotations, setMessageID, setOwner, setPriority, setReplyTo, setRoutingType, setScheduledDeliveryTime, setTimestamp, setUserID, toCore, toDebugString, toPropertyMap, toString, unmarshalledApplicationPropertiesMemoryEstimateFromData, writeDeliveryAnnotationsForSendBufferdebugRefs, debugString, durableDown, durableUp, getDurableCount, getParentRef, getRefCount, getUsage, refDown, refUp, setParentRef, usageDown, usageUpclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddBytes, getMessageIDsetDurable, setMessageIDdurableDown, durableUp, getAnnotationString, getBodyBuffer, getBodyInputStream, getDuplicateIDBytes, getDurableCount, getRefCount, getStringBody, getType, getUsage, getValidatedUserID, isExpired, refDown, refUp, releaseBuffer, setGroupID, setGroupID, setGroupSequence, setType, setValidatedUserID, toMap, toMap, toPropertyMap, usageDown, usageUppublic AMQPLargeMessage(long id,
long messageFormat,
TypedProperties extraProperties,
CoreMessageObjectPools coreMessageObjectPools,
StorageManager storageManager)
public AMQPLargeMessage(long id,
long messageFormat,
TypedProperties extraProperties,
CoreMessageObjectPools coreMessageObjectPools,
StorageManager storageManager,
org.apache.activemq.artemis.core.persistence.impl.journal.LargeBody largeBody)
public ICoreMessage toCore(CoreMessageObjectPools coreMessageObjectPools)
toCore in interface MessagetoCore in class AMQPMessagepublic void releaseEncodedBuffer()
public void releaseEncodedBufferAfterWrite()
getSavedEncodeBuffer() will retain two counters from the buffer, one meant for the call,
and one that must be released only after encoding.
This method is meant to be called when the buffer is actually encoded on the journal, meaning both refs are gone.
and the actual buffer can be released.public void checkReference(MessageReference reference)
public int getPositionAfterDeliveryAnnotations()
public io.netty.buffer.ByteBuf inspectTemporaryBuffer()
public io.netty.buffer.ByteBuf getSavedEncodeBuffer()
protected void readSavedEncoding(io.netty.buffer.ByteBuf buf)
public void validateFile()
throws ActiveMQException
validateFile in interface LargeServerMessageActiveMQExceptionpublic void setFileDurable(boolean value)
public StorageManager getStorageManager()
getStorageManager in interface LargeServerMessagepublic void setStorageManager(StorageManager storageManager)
setStorageManager in interface LargeServerMessagepublic final boolean isDurable()
isDurable in interface MessageisDurable in class AMQPMessagepublic org.apache.qpid.proton.codec.ReadableBuffer getData()
getData in class AMQPMessagepublic void parseHeader(org.apache.qpid.proton.codec.ReadableBuffer buffer)
public void addBytes(org.apache.qpid.proton.codec.ReadableBuffer data)
throws Exception
Exceptionprotected void parseLargeMessage(ActiveMQBuffer data, boolean initialHeader)
protected void parseLargeMessage(byte[] data,
boolean initialHeader)
protected void parseLargeMessage(org.apache.qpid.proton.codec.ReadableBuffer data)
public org.apache.qpid.proton.codec.ReadableBuffer getSendBuffer(int deliveryCount,
MessageReference reference)
AMQPMessageWhen possible this method will present the bytes to the caller without copying them into a new buffer copy. If copying is needed a new Netty buffer is created and returned. The caller should ensure that the reference count on the returned buffer is always decremented to avoid a leak in the case of a copied buffer being returned.
getSendBuffer in class AMQPMessagedeliveryCount - The new delivery count for this message.public Message toMessage()
toMessage in interface LargeServerMessagepublic void addBytes(byte[] bytes)
throws Exception
addBytes in interface org.apache.activemq.artemis.core.replication.ReplicatedLargeMessageaddBytes in interface LargeServerMessageExceptionpublic void addBytes(ActiveMQBuffer bytes, boolean initialHeader) throws Exception
addBytes in interface LargeServerMessageExceptionpublic void setPaged()
setPaged in interface LargeServerMessagepublic void releaseResources(boolean sync,
boolean sendEvent)
releaseResources in interface org.apache.activemq.artemis.core.replication.ReplicatedLargeMessagereleaseResources in interface LargeServerMessagepublic void deleteFile()
throws Exception
deleteFile in interface org.apache.activemq.artemis.core.replication.ReplicatedLargeMessagedeleteFile in interface LargeServerMessageExceptionpublic SequentialFile getAppendFile() throws ActiveMQException
getAppendFile in interface LargeServerMessageActiveMQExceptionpublic boolean isLargeMessage()
isLargeMessage in interface Messagepublic org.apache.activemq.artemis.core.message.LargeBodyReader getLargeBodyReader()
getLargeBodyReader in interface LargeServerMessagepublic org.apache.activemq.artemis.core.persistence.impl.journal.LargeBody getLargeBody()
getLargeBody in interface LargeServerMessagepublic void clearPendingRecordID()
clearPendingRecordID in interface org.apache.activemq.artemis.core.replication.ReplicatedLargeMessagepublic boolean hasPendingRecord()
hasPendingRecord in interface org.apache.activemq.artemis.core.replication.ReplicatedLargeMessagepublic void setPendingRecordID(long pendingRecordID)
setPendingRecordID in interface org.apache.activemq.artemis.core.replication.ReplicatedLargeMessagepublic long getPendingRecordID()
getPendingRecordID in interface org.apache.activemq.artemis.core.replication.ReplicatedLargeMessageprotected void releaseComplete()
releaseComplete in class RefCountMessagepublic Message copy()
copy in interface Messagecopy in class AMQPMessageprotected io.netty.buffer.ByteBuf newHeaderWithoutExpiry(AtomicInteger placeOutput)
public void messageChanged()
messageChanged in interface MessagemessageChanged in class AMQPMessagepublic int getEncodeSize()
getEncodeSize in interface MessagegetEncodeSize in class AMQPMessagepublic long getWholeMessageSize()
getWholeMessageSize in interface Messagepublic int getMemoryEstimate()
getMemoryEstimate in interface MessagegetMemoryEstimate in class AMQPMessagepublic void persist(ActiveMQBuffer targetRecord)
persist in interface Messagepersist in class AMQPMessagepublic int getPersistSize()
getPersistSize in interface MessagegetPersistSize in class AMQPMessagepublic void reloadPersistence(ActiveMQBuffer record, CoreMessageObjectPools pools)
reloadPersistence in interface MessagereloadPersistence in class AMQPMessagepublic long getPersistentSize()
throws ActiveMQException
getPersistentSize in interface MessagegetPersistentSize in class AMQPMessageActiveMQExceptionpublic Persister<Message> getPersister()
getPersister in interface MessagegetPersister in class AMQPMessagepublic void reencode()
reencode in interface Messagereencode in class AMQPMessagepublic void setReencoded(boolean reencoded)
public boolean isReencoded()
protected void ensureDataIsValid()
ensureDataIsValid in class AMQPMessageprotected void encodeMessage()
encodeMessage in class AMQPMessagepublic void referenceOriginalMessage(Message original, String originalQueue)
referenceOriginalMessage in interface MessageCopyright © 2021 The Apache Software Foundation. All rights reserved.