java.lang.Object
org.apache.activemq.artemis.core.persistence.impl.journal.LargeBody

public class LargeBody extends Object
  • Constructor Details

  • Method Details

    • getStorageManager

      public StorageManager getStorageManager()
    • setStorageManager

      public void setStorageManager(StorageManager storageManager)
    • setMessage

      public void setMessage(LargeServerMessage message)
    • 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

      public void addBytes(byte[] bytes) throws Exception
      Throws:
      Exception
    • addBytes

      public void addBytes(ActiveMQBuffer bytes) throws Exception
      Throws:
      Exception
    • ensureFileExists

      public void ensureFileExists(boolean toOpen) throws ActiveMQException
      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

      public long getBodySize() throws ActiveMQException
      Throws:
      ActiveMQException
    • getLargeBodyReader

      public LargeBodyReader getLargeBodyReader()
    • getReadingFile

      public SequentialFile getReadingFile() throws ActiveMQException
      This will return its own File useful for reading the file on the large message while delivering, browsing.. etc
      Throws:
      ActiveMQException
    • replaceFile

      public void replaceFile(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.
    • getAppendFile

      public SequentialFile getAppendFile() throws ActiveMQException
      Throws:
      ActiveMQException
    • checkDelete

      public void checkDelete()
    • referenceOriginalMessage

      public void referenceOriginalMessage(LargeBody original)
    • getReadOnlyBodyBuffer

      public ActiveMQBuffer 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

      public void copyInto(LargeServerMessage newMessage) throws Exception
      Throws:
      Exception
    • copyInto

      public void copyInto(LargeServerMessage newMessage, io.netty.buffer.ByteBuf newHeader, int skipBytes) throws Exception
      Throws:
      Exception
    • createFile

      public SequentialFile createFile()
    • openFile

      protected void openFile() throws Exception
      Throws:
      Exception