Class OffHeapStore


  • public class OffHeapStore
    extends RandomAccessStore
    A storage mechanism that "persists" data in the off-heap area of the main memory.
    • Constructor Detail

      • OffHeapStore

        public OffHeapStore()
    • Method Detail

      • open

        public void open​(java.lang.String fileName,
                         boolean readOnly,
                         char[] encryptionKey)
        Specified by:
        open in class FileStore<SFChunk>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • readFully

        public java.nio.ByteBuffer readFully​(SFChunk chunk,
                                             long pos,
                                             int len)
        Description copied from class: FileStore
        Read data from the store.
        Specified by:
        readFully in class FileStore<SFChunk>
        Parameters:
        chunk - that owns data to be read
        pos - the read "position"
        len - the number of bytes to read
        Returns:
        the byte buffer with data requested
      • free

        public void free​(long pos,
                         int length)
        Description copied from class: RandomAccessStore
        Mark the space as free.
        Overrides:
        free in class RandomAccessStore
        Parameters:
        pos - the position in bytes
        length - the number of bytes
      • writeFully

        public void writeFully​(SFChunk chunk,
                               long pos,
                               java.nio.ByteBuffer src)
        Description copied from class: FileStore
        Write to the file.
        Specified by:
        writeFully in class FileStore<SFChunk>
        Parameters:
        chunk - to write
        pos - the write position
        src - the source buffer
      • getDefaultRetentionTime

        public int getDefaultRetentionTime()
        Description copied from class: FileStore
        Get the default retention time for this store in milliseconds.
        Overrides:
        getDefaultRetentionTime in class FileStore<SFChunk>
        Returns:
        the retention time
      • backup

        public void backup​(java.util.zip.ZipOutputStream out)
        Specified by:
        backup in class FileStore<SFChunk>