public final class LargeServerMessageImpl extends CoreMessage implements LargeServerMessage
address, BODY_OFFSET, buffer, BUFFER_HEADER_SPACE, durable, endOfBodyPosition, messageID, messageIDPosition, priority, properties, timestamp, type, writableBuffer
NO_PENDING_ID
BYTES_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, MAP_TYPE, memoryOffset, OBJECT_TYPE, STREAM_TYPE, TEXT_TYPE
Constructor and Description |
---|
LargeServerMessageImpl(JournalStorageManager storageManager) |
Modifier and Type | Method and Description |
---|---|
void |
addBytes(ActiveMQBuffer bytes) |
void |
addBytes(byte[] bytes) |
static Message |
checkLargeMessage(Message message,
StorageManager storageManager)
This will check if a regular message needs to be converted as large message
|
protected void |
closeFile() |
Message |
copy()
It will generate a new instance of the message encode, being a deep copy, new properties, new everything
|
Message |
copy(long newID)
It will generate a new instance of the message encode, being a deep copy, new properties, new everything
|
protected SequentialFile |
createFile() |
void |
decode(ActiveMQBuffer buffer1) |
void |
decrementDelayDeletionCount() |
int |
decrementRefCount() |
void |
deleteFile() |
void |
encode(ActiveMQBuffer buffer1) |
int |
getBodyBufferSize()
Returns the length in bytes of the body buffer.
|
LargeBodyEncoder |
getBodyEncoder() |
int |
getEncodeSize()
Returns the size of the encoded message.
|
SequentialFile |
getFile() |
int |
getMemoryEstimate() |
long |
getPendingRecordID() |
long |
getPersistentSize()
This is the size of the message when persisted on disk which is used for metrics tracking
Note that even if the message itself is not persisted on disk (ie non-durable) this value is
still 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
|
ActiveMQBuffer |
getReadOnlyBodyBuffer()
Returns a new Buffer slicing the current Body.
|
void |
incrementDelayDeletionCount() |
boolean |
isLargeMessage() |
boolean |
isServerMessage()
We are really interested if this is a LargeServerMessage.
|
protected void |
openFile() |
void |
referenceOriginalMessage(Message original,
String originalQueue) |
void |
releaseResources(boolean sync)
Close the files if opened
|
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() |
checkEncode, clearInternalProperties, containsProperty, containsProperty, copyHeadersAndProperties, decodeHeadersAndProperties, encode, encodeHeadersAndProperties, getAddress, getAddressSimpleString, getAnnotation, getBodyBuffer, getBodyInputStream, getBooleanProperty, getBooleanProperty, getBuffer, getByteProperty, getByteProperty, getBytesProperty, getBytesProperty, getCorrelationID, getDataBuffer, getDoubleProperty, getDoubleProperty, getDuplicateProperty, getEndOfBodyPosition, getExpiration, getFloatProperty, getFloatProperty, getGroupID, getGroupSequence, getHeadersAndPropertiesEncodeSize, getIntProperty, getIntProperty, getLastValueProperty, getLongProperty, getLongProperty, getMessageID, getObjectProperty, getObjectProperty, getPersister, getPersistSize, getPriority, getProperties, getPropertyNames, getReplyTo, getRoutingType, getScheduledDeliveryTime, getShortProperty, getShortProperty, getSimpleStringProperty, getSimpleStringProperty, getStringProperty, getStringProperty, getTimestamp, getType, getUserID, getValidatedUserID, initBuffer, isDurable, messageChanged, persist, putBooleanProperty, putBooleanProperty, putByteProperty, putByteProperty, putBytesProperty, putBytesProperty, putCharProperty, putCharProperty, putDoubleProperty, putDoubleProperty, putFloatProperty, putFloatProperty, putIntProperty, putIntProperty, putLongProperty, putLongProperty, putObjectProperty, putObjectProperty, putShortProperty, putShortProperty, putStringProperty, putStringProperty, putStringProperty, receiveBuffer_1X, receiveBuffer, reloadPersistence, removeAnnotation, removeProperty, removeProperty, sendBuffer_1X, sendBuffer, setAddress, setAddress, setBuffer, setCorrelationID, setDurable, setExpiration, setGroupID, setGroupID, setGroupSequence, setLastValueProperty, setMessageID, setPriority, setReplyTo, setRoutingType, setScheduledDeliveryTime, setTimestamp, setType, setUserID, setUserID, setValidatedUserID, toCore, toCore
decrementDurableRefCount, getContext, getRefCount, incrementDurableRefCount, incrementRefCount, setContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
setDurable, setMessageID
copyHeadersAndProperties, getBodyBuffer, getBodyInputStream, getDataBuffer, getEndOfBodyPosition, getHeadersAndPropertiesEncodeSize, getType, receiveBuffer_1X, sendBuffer_1X, setType, toMap
acceptsConsumer, clearInternalProperties, containsProperty, containsProperty, decrementDurableRefCount, getAddress, getAddressSimpleString, getAnnotation, getAnnotationString, getBooleanProperty, getBooleanProperty, getBuffer, getByteProperty, getByteProperty, getBytesProperty, getBytesProperty, getConnectionID, getContext, getCorrelationID, getDoubleProperty, getDoubleProperty, getDuplicateIDBytes, getDuplicateProperty, getExpiration, getExtraBytesProperty, getFloatProperty, getFloatProperty, getGroupID, getGroupSequence, getIntProperty, getIntProperty, getLastValueProperty, getLongProperty, getLongProperty, getMessageID, getObjectProperty, getObjectProperty, getPersister, getPersistSize, getPriority, getPropertyNames, getRefCount, getReplyTo, getRoutingType, getScheduledDeliveryTime, getShortProperty, getShortProperty, getSimpleStringProperty, getSimpleStringProperty, getStringProperty, getStringProperty, getTimestamp, getUserID, getValidatedUserID, incrementDurableRefCount, incrementRefCount, isDurable, isExpired, messageChanged, persist, 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, reencode, rejectConsumer, releaseBuffer, reloadPersistence, removeAnnotation, removeExtraBytesProperty, removeProperty, removeProperty, sendBuffer, setAddress, setAddress, setAnnotation, setBuffer, setConnectionID, setContext, setCorrelationID, setDurable, setExpiration, setGroupID, setGroupID, setGroupSequence, setLastValueProperty, setMessageID, setPriority, setReplyTo, setRoutingType, setScheduledDeliveryTime, setTimestamp, setUserID, setValidatedUserID, toCore, toCore, toPropertyMap
public LargeServerMessageImpl(JournalStorageManager storageManager)
public static Message checkLargeMessage(Message message, StorageManager storageManager) throws Exception
Exception
public boolean isServerMessage()
ICoreMessage
isServerMessage
in interface ICoreMessage
isServerMessage
in class CoreMessage
public long getPendingRecordID()
getPendingRecordID
in interface ReplicatedLargeMessage
public void setPendingRecordID(long pendingRecordID)
setPendingRecordID
in interface ReplicatedLargeMessage
pendingRecordID
- public void setPaged()
LargeServerMessage
setPaged
in interface LargeServerMessage
public void addBytes(byte[] bytes) throws Exception
addBytes
in interface ReplicatedLargeMessage
addBytes
in interface LargeServerMessage
Exception
LargeServerMessage.addBytes(byte[])
public void addBytes(ActiveMQBuffer bytes) throws Exception
addBytes
in interface LargeServerMessage
Exception
public int getEncodeSize()
Message
getEncodeSize
in interface Message
getEncodeSize
in class CoreMessage
public void encode(ActiveMQBuffer buffer1)
public void decode(ActiveMQBuffer buffer1)
public void incrementDelayDeletionCount()
incrementDelayDeletionCount
in interface LargeServerMessage
public void decrementDelayDeletionCount() throws Exception
decrementDelayDeletionCount
in interface LargeServerMessage
Exception
public LargeBodyEncoder getBodyEncoder() throws ActiveMQException
getBodyEncoder
in interface ICoreMessage
getBodyEncoder
in class CoreMessage
ActiveMQException
public int decrementRefCount() throws Exception
decrementRefCount
in interface Message
decrementRefCount
in class RefCountMessage
Exception
public ActiveMQBuffer getReadOnlyBodyBuffer()
ICoreMessage
getReadOnlyBodyBuffer
in interface ICoreMessage
getReadOnlyBodyBuffer
in class CoreMessage
public int getBodyBufferSize()
ICoreMessage
getBodyBufferSize
in interface ICoreMessage
getBodyBufferSize
in class CoreMessage
public boolean isLargeMessage()
isLargeMessage
in interface Message
isLargeMessage
in class CoreMessage
public void deleteFile() throws Exception
deleteFile
in interface ReplicatedLargeMessage
deleteFile
in interface LargeServerMessage
Exception
LargeServerMessage.deleteFile()
public int getMemoryEstimate()
getMemoryEstimate
in interface Message
getMemoryEstimate
in class CoreMessage
public void releaseResources(boolean sync)
LargeServerMessage
releaseResources
in interface ReplicatedLargeMessage
releaseResources
in interface LargeServerMessage
LargeServerMessage.releaseResources(boolean)
public void referenceOriginalMessage(Message original, String originalQueue)
referenceOriginalMessage
in interface Message
public Message copy()
Message
copy
in interface Message
copy
in class CoreMessage
public Message copy(long newID)
Message
copy
in interface Message
copy
in class CoreMessage
public SequentialFile getFile() throws ActiveMQException
getFile
in interface LargeServerMessage
ActiveMQException
public long getPersistentSize() throws ActiveMQException
Message
getPersistentSize
in interface Message
getPersistentSize
in class CoreMessage
ActiveMQException
public String toString()
toString
in class CoreMessage
public void validateFile() throws ActiveMQException
ActiveMQException
protected SequentialFile createFile()
Copyright © 2019 JBoss by Red Hat. All rights reserved.