Class FastByteOperations.UnsafeOperations

java.lang.Object
org.apache.cassandra.utils.FastByteOperations.UnsafeOperations
All Implemented Interfaces:
FastByteOperations.ByteOperations
Enclosing class:
FastByteOperations

public static final class FastByteOperations.UnsafeOperations extends Object implements FastByteOperations.ByteOperations
  • Constructor Details

    • UnsafeOperations

      public UnsafeOperations()
  • Method Details

    • compare

      public int compare(byte[] buffer1, int offset1, int length1, byte[] buffer2, int offset2, int length2)
      Specified by:
      compare in interface FastByteOperations.ByteOperations
    • compare

      public int compare(ByteBuffer buffer1, byte[] buffer2, int offset2, int length2)
      Specified by:
      compare in interface FastByteOperations.ByteOperations
    • compare

      public int compare(ByteBuffer buffer1, int position1, int length1, byte[] buffer2, int offset2, int length2)
      Specified by:
      compare in interface FastByteOperations.ByteOperations
    • compare

      public int compare(ByteBuffer buffer1, ByteBuffer buffer2)
      Specified by:
      compare in interface FastByteOperations.ByteOperations
    • copy

      public void copy(byte[] src, int srcPosition, byte[] trg, int trgPosition, int length)
      Specified by:
      copy in interface FastByteOperations.ByteOperations
    • copy

      public void copy(ByteBuffer src, int srcPosition, byte[] trg, int trgPosition, int length)
      Specified by:
      copy in interface FastByteOperations.ByteOperations
    • copy

      public void copy(byte[] src, int srcPosition, ByteBuffer trg, int trgPosition, int length)
      Specified by:
      copy in interface FastByteOperations.ByteOperations
    • copy

      public void copy(ByteBuffer srcBuf, int srcPosition, ByteBuffer trgBuf, int trgPosition, int length)
      Specified by:
      copy in interface FastByteOperations.ByteOperations
    • copy

      public static void copy(Object src, long srcOffset, ByteBuffer trgBuf, int trgPosition, int length)
    • copy

      public static void copy(Object src, long srcOffset, byte[] trg, int trgPosition, int length)
    • copy

      public static void copy(Object src, long srcOffset, Object dst, long dstOffset, long length)
    • compareTo

      @Inline public static int compareTo(ByteBuffer buffer1, ByteBuffer buffer2)
    • compareTo

      @Inline public static int compareTo(Object buffer1, long offset1, int length1, ByteBuffer buffer)
    • compareTo

      @Inline public static int compareTo(Object buffer1, long memoryOffset1, int length1, Object buffer2, long memoryOffset2, int length2)
      Lexicographically compare two arrays.
      Parameters:
      buffer1 - left operand: a byte[] or null
      buffer2 - right operand: a byte[] or null
      memoryOffset1 - Where to start comparing in the left buffer (pure memory address if buffer1 is null, or relative otherwise)
      memoryOffset2 - Where to start comparing in the right buffer (pure memory address if buffer1 is null, or relative otherwise)
      length1 - How much to compare from the left buffer
      length2 - How much to compare from the right buffer
      Returns:
      0 if equal, < 0 if left is less than right, etc.