Class UnsafeMemory

java.lang.Object
org.iq80.snappy.UnsafeMemory
All Implemented Interfaces:
Memory

class UnsafeMemory extends Object implements Memory
  • Field Details

    • unsafe

      private static final sun.misc.Unsafe unsafe
    • BYTE_ARRAY_OFFSET

      private static final long BYTE_ARRAY_OFFSET
    • SHORT_ARRAY_OFFSET

      private static final long SHORT_ARRAY_OFFSET
    • SHORT_ARRAY_STRIDE

      private static final long SHORT_ARRAY_STRIDE
  • Constructor Details

    • UnsafeMemory

      UnsafeMemory()
  • Method Details

    • fastAccessSupported

      public boolean fastAccessSupported()
      Specified by:
      fastAccessSupported in interface Memory
    • lookupShort

      public int lookupShort(short[] data, int index)
      Specified by:
      lookupShort in interface Memory
    • loadByte

      public int loadByte(byte[] data, int index)
      Specified by:
      loadByte in interface Memory
    • loadInt

      public int loadInt(byte[] data, int index)
      Specified by:
      loadInt in interface Memory
    • copyLong

      public void copyLong(byte[] src, int srcIndex, byte[] dest, int destIndex)
      Specified by:
      copyLong in interface Memory
    • loadLong

      public long loadLong(byte[] data, int index)
      Specified by:
      loadLong in interface Memory
    • copyMemory

      public void copyMemory(byte[] input, int inputIndex, byte[] output, int outputIndex, int length)
      Specified by:
      copyMemory in interface Memory