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_IDS, messageID, priority, properties, timestamp, type
BYTES_TYPE, DEFAULT_TYPE, HDR_ACTUAL_EXPIRY_TIME, 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, 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)
The copy of the file itself will be done later by
finishCopy() |
void |
copyFrom(SequentialFile fileSource) |
protected SequentialFile |
createFile() |
void |
decode(HornetQBuffer buffer1) |
void |
decrementDelayDeletionCount() |
int |
decrementRefCount() |
void |
deleteFile() |
void |
encode(HornetQBuffer buffer1) |
void |
encodeBody(HornetQBuffer bufferOut,
BodyEncoder context,
int size) |
protected void |
finalize() |
void |
finishCopy() |
BodyEncoder |
getBodyEncoder() |
int |
getEncodeSize() |
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() |
createReference, decrementDurableRefCount, encodeMessageIDToBuffer, forceAddress, getBodyInputStream, getDuplicateIDBytes, getDuplicateProperty, getPagingStore, getRefCount, hasInternalProperties, incrementDurableRefCount, incrementRefCount, isServerMessage, makeCopyForExpiryOrDLA, setMessageID, setPagingStore, storeIsPaging
bodyChanged, checkCompletion, checkCopy, containsProperty, containsProperty, copyHeadersAndProperties, createBody, decodeFromBuffer, decodeHeadersAndProperties, encodeHeadersAndProperties, getAddress, getBodyBuffer, getBodyBufferCopy, 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, 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, resetCopied, setAddress, setAddressTransient, setDurable, setExpiration, setPriority, setTimestamp, setType, setUserID, toMap
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
createReference, decrementDurableRefCount, encodeMessageIDToBuffer, forceAddress, getDuplicateIDBytes, getDuplicateProperty, getPagingStore, getRefCount, hasInternalProperties, incrementDurableRefCount, incrementRefCount, makeCopyForExpiryOrDLA, setMessageID, setPagingStore, storeIsPaging
bodyChanged, checkCopy, decodeFromBuffer, decodeHeadersAndProperties, encodeHeadersAndProperties, getBodyInputStream, getEncodedBuffer, getEndOfBodyPosition, getEndOfMessagePosition, getHeadersAndPropertiesEncodeSize, getTypedProperties, getWholeBuffer, isServerMessage, resetCopied, setAddressTransient
containsProperty, containsProperty, getAddress, getBodyBuffer, getBodyBufferCopy, 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
setDurable, setMessageID
public LargeServerMessageImpl(JournalStorageManager storageManager)
public void setPendingRecordID(long pendingRecordID)
setPendingRecordID
in interface LargeServerMessage
pendingRecordID
- public long getPendingRecordID()
getPendingRecordID
in interface LargeServerMessage
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 encodeBody(HornetQBuffer bufferOut, BodyEncoder context, int size)
public int getEncodeSize()
getEncodeSize
in interface Message
getEncodeSize
in interface EncodingSupport
getEncodeSize
in class MessageImpl
public void encode(HornetQBuffer buffer1)
encode
in interface EncodingSupport
encode
in class MessageImpl
public void decode(HornetQBuffer buffer1)
decode
in interface EncodingSupport
decode
in class MessageImpl
public void incrementDelayDeletionCount()
incrementDelayDeletionCount
in interface LargeServerMessage
public void decrementDelayDeletionCount() throws Exception
decrementDelayDeletionCount
in interface LargeServerMessage
Exception
public BodyEncoder getBodyEncoder() throws HornetQException
getBodyEncoder
in interface MessageInternal
getBodyEncoder
in class MessageImpl
HornetQException
public int decrementRefCount() throws Exception
decrementRefCount
in interface ServerMessage
decrementRefCount
in class ServerMessageImpl
Exception
public boolean isLargeMessage()
isLargeMessage
in interface Message
isLargeMessage
in class ServerMessageImpl
public void deleteFile() throws Exception
deleteFile
in interface ReplicatedLargeMessage
deleteFile
in interface LargeServerMessage
Exception
LargeServerMessage#deleteFile()
public int getMemoryEstimate()
getMemoryEstimate
in interface ServerMessage
getMemoryEstimate
in class ServerMessageImpl
public void releaseResources()
LargeServerMessage
releaseResources
in interface ReplicatedLargeMessage
releaseResources
in interface LargeServerMessage
LargeServerMessage#releaseResources()
public void setOriginalHeaders(ServerMessage other, MessageReference originalReference, boolean expiry)
setOriginalHeaders
in interface ServerMessage
setOriginalHeaders
in class ServerMessageImpl
public ServerMessage copy()
copy
in interface ServerMessage
copy
in class ServerMessageImpl
public void copyFrom(SequentialFile fileSource) throws Exception
Exception
public void finishCopy() throws Exception
finishCopy
in interface ServerMessage
finishCopy
in class ServerMessageImpl
Exception
public ServerMessage copy(long newID)
finishCopy()
copy
in interface ServerMessage
copy
in class ServerMessageImpl
public SequentialFile getFile() throws HornetQException
getFile
in interface LargeServerMessage
HornetQException
public String toString()
toString
in class ServerMessageImpl
protected void finalize() throws Throwable
protected SequentialFile createFile()
Copyright © 2017 JBoss, a division of Red Hat. All Rights Reserved.