Class MemoryRange<T extends org.apache.datasketches.memory.Memory>

java.lang.Object
org.apache.druid.frame.allocation.MemoryRange<T>

public class MemoryRange<T extends org.apache.datasketches.memory.Memory> extends Object
Reference to a particular region of some Memory. This is used because it is cheaper to reuse this object rather than calling Memory.region(long, long) for each row. Not immutable. The pointed-to range may change as this object gets reused.
  • Constructor Details

    • MemoryRange

      public MemoryRange(T memory, long start, long length)
  • Method Details

    • memory

      public T memory()
      Returns the underlying memory *without* clipping it to this particular range. Callers must apply the offset given by start and capacity given by length.
    • start

      public long start()
    • length

      public long length()
    • set

      public void set(T memory, long start, long length)