public class AMQPLargeMessage extends AMQPMessage implements LargeServerMessage
AMQPMessage.MessageDataScanningStatusaddress, ADDRESS_PROPERTY, applicationProperties, applicationPropertiesPosition, connectionID, coreMessageObjectPools, DEFAULT_MESSAGE_FORMAT, DEFAULT_MESSAGE_PRIORITY, deliveryAnnotationsForSendBuffer, deliveryAnnotationsPosition, encodedDeliveryAnnotationsSize, encodedHeaderSize, expiration, 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_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) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBytes(ActiveMQBuffer bytes) |
void |
addBytes(byte[] bytes) |
void |
addBytes(org.apache.qpid.proton.codec.ReadableBuffer data) |
void |
clearPendingRecordID() |
void |
closeLargeMessage() |
Message |
copy() |
Message |
copy(long newID) |
void |
deleteFile() |
protected void |
encodeMessage() |
protected void |
ensureDataIsValid() |
void |
finishParse() |
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() |
io.netty.buffer.ByteBuf |
getSavedEncodeBuffer() |
org.apache.qpid.proton.codec.ReadableBuffer |
getSendBuffer(int deliveryCount)
Gets a ByteBuf from the Message that contains the encoded bytes to be sent on the wire.
|
StorageManager |
getStorageManager() |
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() |
void |
messageChanged() |
void |
openLargeMessage() |
void |
parseHeader(org.apache.qpid.proton.codec.ReadableBuffer buffer) |
void |
persist(ActiveMQBuffer targetRecord) |
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) |
void |
reloadPersistence(ActiveMQBuffer record,
CoreMessageObjectPools pools) |
void |
setFileDurable(boolean value) |
void |
setPaged() |
void |
setPendingRecordID(long pendingRecordID) |
void |
setStorageManager(StorageManager storageManager) |
ICoreMessage |
toCore(CoreMessageObjectPools coreMessageObjectPools) |
Message |
toMessage() |
void |
validateFile() |
acceptsConsumer, cachedAddressSimpleString, clearInternalProperties, containsProperty, containsProperty, createCopyWithNewDeliveryCount, createCopyWithSkippedOrExplicitlySetDeliveryAnnotations, createExtraProperties, ensureMessageDataScanned, ensureScanning, getAddress, getAddressSimpleString, getAMQPUserID, getAnnotation, getApplicationProperties, getApplicationPropertiesMap, getBody, getBooleanProperty, getBooleanProperty, getBrokerProperty, getBuffer, getByteProperty, getByteProperty, getBytesProperty, getBytesProperty, getConnectionID, getCorrelationID, getDecodedApplicationProperties, getDeliveryAnnotations, getDeliveryAnnotationsForSendBufferSize, getDoubleProperty, getDoubleProperty, getDuplicateProperty, getEstimateSavedEncode, getExpiration, getExtraBytesProperty, getExtraProperties, getFloatProperty, getFloatProperty, getFooter, getGroupID, getGroupSequence, getHeader, getIntProperty, getIntProperty, getLastValueProperty, getLongProperty, getLongProperty, getMessageAnnotation, getMessageAnnotation, getMessageAnnotations, getMessageAnnotationsMap, getMessageFormat, getMessageID, getObjectProperty, getObjectProperty, getObjectPropertyForFilter, getPriority, getProperties, getPropertyKeysPool, getPropertyNames, getPropertyValuesPool, getProtonMessage, getReplyTo, getRoutingType, getScheduledDeliveryTime, getShortProperty, getShortProperty, getSimpleStringProperty, getSimpleStringProperty, getStringProperty, getStringProperty, getTimestamp, getUserID, hasScheduledDeliveryTime, internalPersistSize, lazyDecodeApplicationProperties, lazyScanAfterReloadPersistence, messageDataScanned, putBooleanProperty, putBooleanProperty, putByteProperty, putByteProperty, putBytesProperty, putBytesProperty, putCharProperty, putCharProperty, putDoubleProperty, putDoubleProperty, putExtraBytesProperty, putFloatProperty, putFloatProperty, putIntProperty, putIntProperty, putLongProperty, putLongProperty, putObjectProperty, putObjectProperty, putShortProperty, putShortProperty, putStringProperty, putStringProperty, putStringProperty, readSavedEncoding, receiveBuffer, rejectConsumer, removeAnnotation, removeExtraBytesProperty, removeMessageAnnotation, removeProperty, removeProperty, resetMessageData, saveEncoding, scanForMessageSection, scanMessageData, sendBuffer, setAddress, setAddress, setAnnotation, setBrokerProperty, setBuffer, setConnectionID, setCorrelationID, setDeliveryAnnotationsForSendBuffer, setDurable, setExpiration, setExtraProperties, setLastValueProperty, setMessageAnnotation, setMessageAnnotation, setMessageID, setPriority, setReplyTo, setRoutingType, setScheduledDeliveryTime, setTimestamp, setUserID, toCore, toDebugString, toString, writeDeliveryAnnotationsForSendBufferdebugRefs, debugString, durableDown, durableUp, getDurableCount, getParentRef, getRefCount, getUsage, refDown, refUp, setParentRef, usageDown, usageUpclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetMessageIDsetDurable, setMessageIDdurableDown, durableUp, getAnnotationString, getBodyBuffer, getBodyInputStream, getDuplicateIDBytes, getDurableCount, getRefCount, getType, getUsage, getValidatedUserID, isExpired, refDown, refUp, releaseBuffer, setGroupID, setGroupID, setGroupSequence, setType, setValidatedUserID, toMap, toPropertyMap, usageDown, usageUppublic AMQPLargeMessage(long id,
long messageFormat,
TypedProperties extraProperties,
CoreMessageObjectPools coreMessageObjectPools,
StorageManager storageManager)
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 io.netty.buffer.ByteBuf inspectTemporaryBuffer()
public io.netty.buffer.ByteBuf getSavedEncodeBuffer()
public void finishParse()
throws Exception
finishParse in interface LargeServerMessageExceptionpublic 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
Exceptionpublic org.apache.qpid.proton.codec.ReadableBuffer getSendBuffer(int deliveryCount)
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) throws Exception
addBytes in interface LargeServerMessageExceptionpublic void setPaged()
setPaged in interface LargeServerMessagepublic void releaseResources(boolean sync)
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 AMQPMessagepublic void messageChanged()
messageChanged in interface MessagemessageChanged in class AMQPMessagepublic int getEncodeSize()
getEncodeSize in interface MessagegetEncodeSize in class AMQPMessagepublic 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 AMQPMessageprotected void ensureDataIsValid()
ensureDataIsValid in class AMQPMessageprotected void encodeMessage()
encodeMessage in class AMQPMessagepublic void referenceOriginalMessage(Message original, String originalQueue)
referenceOriginalMessage in interface MessageCopyright © 2020 The Apache Software Foundation. All Rights Reserved.