Class LargeBody
java.lang.Object
org.apache.activemq.artemis.core.persistence.impl.journal.LargeBody
-
Constructor Summary
ConstructorsConstructorDescriptionLargeBody(LargeServerMessage message, StorageManager storageManager) LargeBody(LargeServerMessage message, StorageManager storageManager, SequentialFile file) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBytes(byte[] bytes) voidaddBytes(ActiveMQBuffer bytes) voidvoidvoidcopyInto(LargeServerMessage newMessage) voidcopyInto(LargeServerMessage newMessage, io.netty.buffer.ByteBuf newHeader, int skipBytes) voidvoidensureFileExists(boolean toOpen) intlonglongThis will return its own File useful for reading the file on the large message while delivering, browsing.. etclongThis will return the bodySize without trying to open the file, just returning what's currently storedbooleanisPaged()protected voidopenFile()voidreferenceOriginalMessage(LargeBody original) voidvoidreleaseResources(boolean sync, boolean sendEvent) sendEvent means it's a close happening from end of write largemessage.voidreplaceFile(SequentialFile file) Meant for test-ability, be careful if you decide to use it. and in case you use it for a real reason, please change the documentation here.voidsetBodySize(long size) voidsetMessage(LargeServerMessage message) voidsetPaged()voidsetStorageManager(StorageManager storageManager)
-
Constructor Details
-
LargeBody
-
LargeBody
-
-
Method Details
-
getStorageManager
-
setStorageManager
-
setMessage
-
setPaged
public void setPaged() -
isPaged
public boolean isPaged() -
clearFile
public void clearFile() -
releaseComplete
public void releaseComplete() -
deleteFile
public void deleteFile() -
getMessageID
public long getMessageID() -
addBytes
- Throws:
Exception
-
addBytes
- Throws:
Exception
-
ensureFileExists
- Throws:
ActiveMQException
-
getStoredBodySize
public long getStoredBodySize()This will return the bodySize without trying to open the file, just returning what's currently stored -
setBodySize
public void setBodySize(long size) -
getBodySize
- Throws:
ActiveMQException
-
getLargeBodyReader
-
getReadingFile
This will return its own File useful for reading the file on the large message while delivering, browsing.. etc- Throws:
ActiveMQException
-
replaceFile
Meant for test-ability, be careful if you decide to use it. and in case you use it for a real reason, please change the documentation here. -
getAppendFile
- Throws:
ActiveMQException
-
checkDelete
public void checkDelete() -
referenceOriginalMessage
-
getReadOnlyBodyBuffer
-
getBodyBufferSize
public int getBodyBufferSize() -
releaseResources
public void releaseResources(boolean sync, boolean sendEvent) sendEvent means it's a close happening from end of write largemessage. While reading the largemessage we don't need (and shouldn't inform the backup -
copyInto
- Throws:
Exception
-
copyInto
public void copyInto(LargeServerMessage newMessage, io.netty.buffer.ByteBuf newHeader, int skipBytes) throws Exception - Throws:
Exception
-
createFile
-
openFile
- Throws:
Exception
-