Class JDBCSequentialFile

  • All Implemented Interfaces:
    org.apache.activemq.artemis.core.io.SequentialFile

    public class JDBCSequentialFile
    extends java.lang.Object
    implements org.apache.activemq.artemis.core.io.SequentialFile
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addMetaData​(java.lang.Object key, java.lang.Object value)  
      void blockingWriteDirect​(java.nio.ByteBuffer bytes, boolean sync, boolean releaseBuffer)  
      int calculateBlockStart​(int position)  
      org.apache.activemq.artemis.core.io.SequentialFile cloneFile()  
      void close()  
      void close​(boolean waitOnSync, boolean block)  
      void copyTo​(org.apache.activemq.artemis.core.io.SequentialFile cloneFile)  
      void delete()  
      boolean exists()  
      void fill​(int size)  
      boolean fits​(int size)  
      java.lang.String getExtension()  
      java.lang.String getFilename()  
      java.lang.String getFileName()  
      long getId()  
      java.io.File getJavaFile()  
      java.lang.Object getMetaData​(java.lang.Object key)  
      int internalWrite​(org.apache.activemq.artemis.api.core.ActiveMQBuffer buffer, org.apache.activemq.artemis.core.io.IOCallback callback)  
      int internalWrite​(org.apache.activemq.artemis.api.core.ActiveMQBuffer buffer, org.apache.activemq.artemis.core.io.IOCallback callback, boolean append)  
      boolean isOpen()  
      java.nio.ByteBuffer map​(int position, long size)  
      void open()  
      void open​(int maxIO, boolean useExecutor)  
      long position()  
      void position​(long pos)  
      int read​(java.nio.ByteBuffer bytes)  
      int read​(java.nio.ByteBuffer bytes, org.apache.activemq.artemis.core.io.IOCallback callback)  
      void renameTo​(java.lang.String newFileName)  
      void setId​(long id)  
      void setTimedBuffer​(org.apache.activemq.artemis.core.io.buffer.TimedBuffer buffer)  
      long size()  
      void sync()  
      void write​(org.apache.activemq.artemis.api.core.ActiveMQBuffer bytes, boolean sync)  
      void write​(org.apache.activemq.artemis.api.core.ActiveMQBuffer bytes, boolean sync, org.apache.activemq.artemis.core.io.IOCallback callback)  
      void write​(org.apache.activemq.artemis.api.core.ActiveMQBuffer bytes, boolean sync, org.apache.activemq.artemis.core.io.IOCallback callback, boolean append)  
      void write​(org.apache.activemq.artemis.core.journal.EncodingSupport bytes, boolean sync)  
      void write​(org.apache.activemq.artemis.core.journal.EncodingSupport bytes, boolean sync, org.apache.activemq.artemis.core.io.IOCallback callback)  
      void writeDirect​(java.nio.ByteBuffer bytes, boolean sync)  
      void writeDirect​(java.nio.ByteBuffer bytes, boolean sync, org.apache.activemq.artemis.core.io.IOCallback callback)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.activemq.artemis.core.io.SequentialFile

        afterComplete
    • Method Detail

      • isOpen

        public boolean isOpen()
        Specified by:
        isOpen in interface org.apache.activemq.artemis.core.io.SequentialFile
      • exists

        public boolean exists()
        Specified by:
        exists in interface org.apache.activemq.artemis.core.io.SequentialFile
      • open

        public void open()
                  throws java.lang.Exception
        Specified by:
        open in interface org.apache.activemq.artemis.core.io.SequentialFile
        Throws:
        java.lang.Exception
      • open

        public void open​(int maxIO,
                         boolean useExecutor)
                  throws java.lang.Exception
        Specified by:
        open in interface org.apache.activemq.artemis.core.io.SequentialFile
        Throws:
        java.lang.Exception
      • fits

        public boolean fits​(int size)
        Specified by:
        fits in interface org.apache.activemq.artemis.core.io.SequentialFile
      • calculateBlockStart

        public int calculateBlockStart​(int position)
                                throws java.lang.Exception
        Specified by:
        calculateBlockStart in interface org.apache.activemq.artemis.core.io.SequentialFile
        Throws:
        java.lang.Exception
      • getFileName

        public java.lang.String getFileName()
        Specified by:
        getFileName in interface org.apache.activemq.artemis.core.io.SequentialFile
      • fill

        public void fill​(int size)
                  throws java.lang.Exception
        Specified by:
        fill in interface org.apache.activemq.artemis.core.io.SequentialFile
        Throws:
        java.lang.Exception
      • map

        public java.nio.ByteBuffer map​(int position,
                                       long size)
                                throws java.io.IOException
        Specified by:
        map in interface org.apache.activemq.artemis.core.io.SequentialFile
        Throws:
        java.io.IOException
      • delete

        public void delete()
                    throws java.io.IOException,
                           java.lang.InterruptedException,
                           org.apache.activemq.artemis.api.core.ActiveMQException
        Specified by:
        delete in interface org.apache.activemq.artemis.core.io.SequentialFile
        Throws:
        java.io.IOException
        java.lang.InterruptedException
        org.apache.activemq.artemis.api.core.ActiveMQException
      • internalWrite

        public int internalWrite​(org.apache.activemq.artemis.api.core.ActiveMQBuffer buffer,
                                 org.apache.activemq.artemis.core.io.IOCallback callback)
      • internalWrite

        public int internalWrite​(org.apache.activemq.artemis.api.core.ActiveMQBuffer buffer,
                                 org.apache.activemq.artemis.core.io.IOCallback callback,
                                 boolean append)
      • write

        public void write​(org.apache.activemq.artemis.api.core.ActiveMQBuffer bytes,
                          boolean sync,
                          org.apache.activemq.artemis.core.io.IOCallback callback,
                          boolean append)
                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • write

        public void write​(org.apache.activemq.artemis.api.core.ActiveMQBuffer bytes,
                          boolean sync,
                          org.apache.activemq.artemis.core.io.IOCallback callback)
                   throws java.lang.Exception
        Specified by:
        write in interface org.apache.activemq.artemis.core.io.SequentialFile
        Throws:
        java.lang.Exception
      • write

        public void write​(org.apache.activemq.artemis.api.core.ActiveMQBuffer bytes,
                          boolean sync)
                   throws java.lang.Exception
        Specified by:
        write in interface org.apache.activemq.artemis.core.io.SequentialFile
        Throws:
        java.lang.Exception
      • write

        public void write​(org.apache.activemq.artemis.core.journal.EncodingSupport bytes,
                          boolean sync,
                          org.apache.activemq.artemis.core.io.IOCallback callback)
                   throws java.lang.Exception
        Specified by:
        write in interface org.apache.activemq.artemis.core.io.SequentialFile
        Throws:
        java.lang.Exception
      • write

        public void write​(org.apache.activemq.artemis.core.journal.EncodingSupport bytes,
                          boolean sync)
                   throws java.lang.Exception
        Specified by:
        write in interface org.apache.activemq.artemis.core.io.SequentialFile
        Throws:
        java.lang.Exception
      • writeDirect

        public void writeDirect​(java.nio.ByteBuffer bytes,
                                boolean sync,
                                org.apache.activemq.artemis.core.io.IOCallback callback)
        Specified by:
        writeDirect in interface org.apache.activemq.artemis.core.io.SequentialFile
      • blockingWriteDirect

        public void blockingWriteDirect​(java.nio.ByteBuffer bytes,
                                        boolean sync,
                                        boolean releaseBuffer)
        Specified by:
        blockingWriteDirect in interface org.apache.activemq.artemis.core.io.SequentialFile
      • writeDirect

        public void writeDirect​(java.nio.ByteBuffer bytes,
                                boolean sync)
                         throws java.lang.Exception
        Specified by:
        writeDirect in interface org.apache.activemq.artemis.core.io.SequentialFile
        Throws:
        java.lang.Exception
      • read

        public int read​(java.nio.ByteBuffer bytes,
                        org.apache.activemq.artemis.core.io.IOCallback callback)
                 throws java.sql.SQLException
        Specified by:
        read in interface org.apache.activemq.artemis.core.io.SequentialFile
        Throws:
        java.sql.SQLException
      • read

        public int read​(java.nio.ByteBuffer bytes)
                 throws java.lang.Exception
        Specified by:
        read in interface org.apache.activemq.artemis.core.io.SequentialFile
        Throws:
        java.lang.Exception
      • position

        public void position​(long pos)
                      throws java.io.IOException
        Specified by:
        position in interface org.apache.activemq.artemis.core.io.SequentialFile
        Throws:
        java.io.IOException
      • position

        public long position()
        Specified by:
        position in interface org.apache.activemq.artemis.core.io.SequentialFile
      • close

        public void close()
                   throws java.lang.Exception
        Specified by:
        close in interface org.apache.activemq.artemis.core.io.SequentialFile
        Throws:
        java.lang.Exception
      • close

        public void close​(boolean waitOnSync,
                          boolean block)
                   throws java.lang.Exception
        Specified by:
        close in interface org.apache.activemq.artemis.core.io.SequentialFile
        Throws:
        java.lang.Exception
      • sync

        public void sync()
                  throws java.io.IOException
        Specified by:
        sync in interface org.apache.activemq.artemis.core.io.SequentialFile
        Throws:
        java.io.IOException
      • size

        public long size()
                  throws java.lang.Exception
        Specified by:
        size in interface org.apache.activemq.artemis.core.io.SequentialFile
        Throws:
        java.lang.Exception
      • renameTo

        public void renameTo​(java.lang.String newFileName)
                      throws java.lang.Exception
        Specified by:
        renameTo in interface org.apache.activemq.artemis.core.io.SequentialFile
        Throws:
        java.lang.Exception
      • cloneFile

        public org.apache.activemq.artemis.core.io.SequentialFile cloneFile()
        Specified by:
        cloneFile in interface org.apache.activemq.artemis.core.io.SequentialFile
      • copyTo

        public void copyTo​(org.apache.activemq.artemis.core.io.SequentialFile cloneFile)
                    throws java.lang.Exception
        Specified by:
        copyTo in interface org.apache.activemq.artemis.core.io.SequentialFile
        Throws:
        java.lang.Exception
      • getId

        public long getId()
      • setId

        public void setId​(long id)
      • getFilename

        public java.lang.String getFilename()
      • getExtension

        public java.lang.String getExtension()
      • setTimedBuffer

        public void setTimedBuffer​(org.apache.activemq.artemis.core.io.buffer.TimedBuffer buffer)
        Specified by:
        setTimedBuffer in interface org.apache.activemq.artemis.core.io.SequentialFile
      • getJavaFile

        public java.io.File getJavaFile()
        Specified by:
        getJavaFile in interface org.apache.activemq.artemis.core.io.SequentialFile
      • addMetaData

        public void addMetaData​(java.lang.Object key,
                                java.lang.Object value)
      • getMetaData

        public java.lang.Object getMetaData​(java.lang.Object key)