public final class LargeServerMessageImpl extends CoreMessage implements LargeServerMessage
address, BODY_OFFSET, buffer, BUFFER_HEADER_SPACE, durable, endOfBodyPosition, messageID, messageIDPosition, priority, properties, timestamp, type, writableBufferNO_PENDING_IDBYTES_TYPE, DEFAULT_TYPE, EMBEDDED_TYPE, HDR_ACTUAL_EXPIRY_TIME, HDR_BRIDGE_DUPLICATE_ID, 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_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(byte[] bytes) |
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) |
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()
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, checkProperties, cleanupInternalProperties, containsProperty, containsProperty, copyHeadersAndProperties, decodeHeadersAndProperties, encode, encodeHeadersAndProperties, getAddress, getAddressSimpleString, getAnnotation, getBodyBuffer, getBodyInputStream, getBooleanProperty, getBooleanProperty, getBuffer, getByteProperty, getByteProperty, getBytesProperty, getBytesProperty, getDataBuffer, getDoubleProperty, getDoubleProperty, getDuplicateProperty, getEndOfBodyPosition, getExpiration, getFloatProperty, getFloatProperty, getGroupID, getHeadersAndPropertiesEncodeSize, getIntProperty, getIntProperty, getLastValueProperty, getLongProperty, getLongProperty, getMessageID, getObjectProperty, getObjectProperty, getPersister, getPersistSize, getPriority, getPropertyNames, getReplyTo, getRoutingType, getScheduledDeliveryTime, getShortProperty, getShortProperty, getSimpleStringProperty, getSimpleStringProperty, getStringProperty, getStringProperty, getTimestamp, getType, getTypedProperties, 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, setDurable, setExpiration, setLastValueProperty, setMessageID, setPriority, setReplyTo, setRoutingType, setScheduledDeliveryTime, setTimestamp, setType, setUserID, setUserID, setValidatedUserID, toCore, toCoredecrementDurableRefCount, getContext, getRefCount, incrementDurableRefCount, incrementRefCount, setContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsetDurable, setMessageIDcopyHeadersAndProperties, getBodyBuffer, getBodyInputStream, getDataBuffer, getEndOfBodyPosition, getHeadersAndPropertiesEncodeSize, getType, receiveBuffer_1X, sendBuffer_1X, setType, toMapacceptsConsumer, cleanupInternalProperties, containsProperty, containsProperty, decrementDurableRefCount, getAddress, getAddressSimpleString, getAnnotation, getAnnotationString, getBooleanProperty, getBooleanProperty, getBuffer, getByteProperty, getByteProperty, getBytesProperty, getBytesProperty, getConnectionID, getContext, getDoubleProperty, getDoubleProperty, getDuplicateIDBytes, getDuplicateProperty, getExpiration, getExtraBytesProperty, getFloatProperty, getFloatProperty, getGroupID, 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, setDurable, setExpiration, setLastValueProperty, setMessageID, setPriority, setReplyTo, setRoutingType, setScheduledDeliveryTime, setTimestamp, setUserID, setValidatedUserID, toCore, toCore, toPropertyMappublic LargeServerMessageImpl(JournalStorageManager storageManager)
public boolean isServerMessage()
ICoreMessageisServerMessage in interface ICoreMessageisServerMessage in class CoreMessagepublic long getPendingRecordID()
getPendingRecordID in interface ReplicatedLargeMessagepublic void setPendingRecordID(long pendingRecordID)
setPendingRecordID in interface ReplicatedLargeMessagependingRecordID - public void setPaged()
LargeServerMessagesetPaged in interface LargeServerMessagepublic void addBytes(byte[] bytes)
throws Exception
addBytes in interface ReplicatedLargeMessageaddBytes in interface LargeServerMessageExceptionLargeServerMessage.addBytes(byte[])public int getEncodeSize()
MessagegetEncodeSize in interface MessagegetEncodeSize in class CoreMessagepublic void encode(ActiveMQBuffer buffer1)
public void decode(ActiveMQBuffer buffer1)
public void incrementDelayDeletionCount()
incrementDelayDeletionCount in interface LargeServerMessagepublic void decrementDelayDeletionCount()
throws Exception
decrementDelayDeletionCount in interface LargeServerMessageExceptionpublic LargeBodyEncoder getBodyEncoder() throws ActiveMQException
getBodyEncoder in interface ICoreMessagegetBodyEncoder in class CoreMessageActiveMQExceptionpublic int decrementRefCount()
throws Exception
decrementRefCount in interface MessagedecrementRefCount in class RefCountMessageExceptionpublic ActiveMQBuffer getReadOnlyBodyBuffer()
ICoreMessagegetReadOnlyBodyBuffer in interface ICoreMessagegetReadOnlyBodyBuffer in class CoreMessagepublic boolean isLargeMessage()
isLargeMessage in interface MessageisLargeMessage in class CoreMessagepublic void deleteFile()
throws Exception
deleteFile in interface ReplicatedLargeMessagedeleteFile in interface LargeServerMessageExceptionLargeServerMessage.deleteFile()public int getMemoryEstimate()
getMemoryEstimate in interface MessagegetMemoryEstimate in class CoreMessagepublic void releaseResources()
LargeServerMessagereleaseResources in interface ReplicatedLargeMessagereleaseResources in interface LargeServerMessageLargeServerMessage.releaseResources()public void referenceOriginalMessage(Message original, String originalQueue)
referenceOriginalMessage in interface Messagepublic Message copy()
Messagecopy in interface Messagecopy in class CoreMessagepublic Message copy(long newID)
Messagecopy in interface Messagecopy in class CoreMessagepublic SequentialFile getFile() throws ActiveMQException
getFile in interface LargeServerMessageActiveMQExceptionpublic long getPersistentSize()
throws ActiveMQException
MessagegetPersistentSize in interface MessagegetPersistentSize in class CoreMessageActiveMQExceptionpublic String toString()
toString in class CoreMessagepublic void validateFile()
throws ActiveMQException
ActiveMQExceptionprotected SequentialFile createFile()
Copyright © 2019 JBoss by Red Hat. All rights reserved.