Class OffHeapStore

java.lang.Object
org.h2.mvstore.FileStore<org.h2.mvstore.SFChunk>
org.h2.mvstore.RandomAccessStore
org.h2.mvstore.OffHeapStore

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

    • OffHeapStore

      public OffHeapStore()
  • Method Details

    • open

      public void open(String fileName, boolean readOnly, char[] encryptionKey)
      Specified by:
      open in class FileStore<org.h2.mvstore.SFChunk>
    • open

      public OffHeapStore open(String fileName, boolean readOnly)
      Specified by:
      open in class FileStore<org.h2.mvstore.SFChunk>
    • toString

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

      public ByteBuffer readFully(org.h2.mvstore.SFChunk chunk, long pos, int len)
      Description copied from class: FileStore
      Read data from the store.
      Specified by:
      readFully in class FileStore<org.h2.mvstore.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(org.h2.mvstore.SFChunk chunk, long pos, ByteBuffer src)
      Description copied from class: FileStore
      Write to the file.
      Specified by:
      writeFully in class FileStore<org.h2.mvstore.SFChunk>
      Parameters:
      chunk - to write
      pos - the write position
      src - the source buffer
    • truncate

      public void truncate(long size)
      Specified by:
      truncate in class RandomAccessStore
    • getDefaultRetentionTime

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

      public void backup(ZipOutputStream out)
      Specified by:
      backup in class FileStore<org.h2.mvstore.SFChunk>