Class NIOSequentialFileFactory

    • Constructor Detail

      • NIOSequentialFileFactory

        public NIOSequentialFileFactory​(java.io.File journalDir,
                                        int maxIO)
      • NIOSequentialFileFactory

        public NIOSequentialFileFactory​(java.io.File journalDir,
                                        IOCriticalErrorListener listener,
                                        int maxIO)
      • NIOSequentialFileFactory

        public NIOSequentialFileFactory​(java.io.File journalDir,
                                        boolean buffered,
                                        int maxIO)
      • NIOSequentialFileFactory

        public NIOSequentialFileFactory​(java.io.File journalDir,
                                        boolean buffered,
                                        IOCriticalErrorListener listener,
                                        int maxIO)
      • NIOSequentialFileFactory

        public NIOSequentialFileFactory​(java.io.File journalDir,
                                        boolean buffered,
                                        int bufferSize,
                                        int bufferTimeout,
                                        int maxIO,
                                        boolean logRates)
      • NIOSequentialFileFactory

        public NIOSequentialFileFactory​(java.io.File journalDir,
                                        boolean buffered,
                                        int bufferSize,
                                        int bufferTimeout,
                                        int maxIO,
                                        boolean logRates,
                                        IOCriticalErrorListener listener,
                                        org.apache.activemq.artemis.utils.critical.CriticalAnalyzer analyzer)
    • Method Detail

      • allocateDirectByteBuffer

        public static java.nio.ByteBuffer allocateDirectByteBuffer​(int size)
      • enableBufferReuse

        public void enableBufferReuse()
      • disableBufferReuse

        public void disableBufferReuse()
      • createSequentialFile

        public SequentialFile createSequentialFile​(java.lang.String fileName)
      • isSupportsCallbacks

        public boolean isSupportsCallbacks()
      • allocateDirectBuffer

        public java.nio.ByteBuffer allocateDirectBuffer​(int size)
        Description copied from interface: SequentialFileFactory
        used for cases where you need direct buffer outside of the journal context. This is because the native layer has a method that can be reused in certain cases like paging
      • releaseDirectBuffer

        public void releaseDirectBuffer​(java.nio.ByteBuffer buffer)
        Description copied from interface: SequentialFileFactory
        used for cases where you need direct buffer outside of the journal context. This is because the native layer has a method that can be reused in certain cases like paging
      • newBuffer

        public java.nio.ByteBuffer newBuffer​(int size)
        Description copied from interface: SequentialFileFactory
        Note: You need to release the buffer if is used for reading operations. You don't need to do it if using writing operations (AIO Buffer Lister will take of writing operations)
        Returns:
        the allocated ByteBuffer
      • newBuffer

        public java.nio.ByteBuffer newBuffer​(int size,
                                             boolean zeroed)
        Description copied from interface: SequentialFileFactory
        Note: You need to release the buffer if is used for reading operations. You don't need to do it if using writing operations (AIO Buffer Lister will take of writing operations)
        zeroed - if true the returned ByteBuffer must be zeroed, otherwise it tries to save zeroing it.
        Returns:
        the allocated ByteBuffer
      • clearBuffer

        public void clearBuffer​(java.nio.ByteBuffer buffer)
      • wrapBuffer

        public java.nio.ByteBuffer wrapBuffer​(byte[] bytes)
      • calculateBlockSize

        public int calculateBlockSize​(int bytes)