Class DynamicPositionedMutableByteRange

  • All Implemented Interfaces:
    Comparable<org.apache.hadoop.hbase.util.ByteRange>, org.apache.hadoop.hbase.util.ByteRange, org.apache.hadoop.hbase.util.PositionedByteRange

    public class DynamicPositionedMutableByteRange
    extends org.apache.hadoop.hbase.util.AbstractPositionedByteRange
    • Field Summary

      • Fields inherited from class org.apache.hadoop.hbase.util.AbstractPositionedByteRange

        limit, position
      • Fields inherited from class org.apache.hadoop.hbase.util.AbstractByteRange

        bytes, hash, length, offset, UNSET_HASH_VALUE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.hadoop.hbase.util.PositionedByteRange deepCopy()  
      org.apache.hadoop.hbase.util.PositionedByteRange get​(int index, byte[] dst)  
      org.apache.hadoop.hbase.util.PositionedByteRange get​(int index, byte[] dst, int offset, int length)  
      org.apache.hadoop.hbase.util.PositionedByteRange put​(byte val)  
      org.apache.hadoop.hbase.util.PositionedByteRange put​(byte[] val)  
      org.apache.hadoop.hbase.util.PositionedByteRange put​(byte[] val, int offset, int length)  
      org.apache.hadoop.hbase.util.PositionedByteRange put​(int index, byte val)  
      org.apache.hadoop.hbase.util.PositionedByteRange put​(int index, byte[] val)  
      org.apache.hadoop.hbase.util.PositionedByteRange put​(int index, byte[] val, int offset, int length)  
      org.apache.hadoop.hbase.util.PositionedByteRange putInt​(int val)  
      org.apache.hadoop.hbase.util.PositionedByteRange putInt​(int index, int val)  
      org.apache.hadoop.hbase.util.PositionedByteRange putLong​(int index, long val)  
      org.apache.hadoop.hbase.util.PositionedByteRange putLong​(long val)  
      org.apache.hadoop.hbase.util.PositionedByteRange putShort​(int index, short val)  
      org.apache.hadoop.hbase.util.PositionedByteRange putShort​(short val)  
      int putVLong​(int index, long val)  
      int putVLong​(long val)  
      org.apache.hadoop.hbase.util.PositionedByteRange set​(byte[] bytes)  
      org.apache.hadoop.hbase.util.PositionedByteRange set​(byte[] bytes, int offset, int length)  
      org.apache.hadoop.hbase.util.PositionedByteRange set​(int capacity)  
      org.apache.hadoop.hbase.util.PositionedByteRange setLength​(int length)
      Update the length of this range.
      org.apache.hadoop.hbase.util.PositionedByteRange setOffset​(int offset)
      Update the beginning of this range.
      org.apache.hadoop.hbase.util.PositionedByteRange shallowCopy()  
      org.apache.hadoop.hbase.util.PositionedByteRange shallowCopySubRange​(int innerOffset, int copyLength)  
      org.apache.hadoop.hbase.util.PositionedByteRange unset()  
      • Methods inherited from class org.apache.hadoop.hbase.util.AbstractPositionedByteRange

        get, get, get, getInt, getLimit, getLong, getPosition, getRemaining, getShort, getVLong, peek, setLimit, setPosition
      • Methods inherited from class org.apache.hadoop.hbase.util.AbstractByteRange

        clearHashCache, compareTo, deepCopySubRangeTo, deepCopyTo, deepCopyToNewArray, equals, get, getBytes, getInt, getLength, getLong, getOffset, getShort, getVLong, getVLongSize, hashCode, isEmpty, isEmpty, isHashCached, toString
      • Methods inherited from interface org.apache.hadoop.hbase.util.ByteRange

        deepCopySubRangeTo, deepCopyTo, deepCopyToNewArray, get, getBytes, getInt, getLength, getLong, getOffset, getShort, getVLong, isEmpty
    • Constructor Detail

      • DynamicPositionedMutableByteRange

        public DynamicPositionedMutableByteRange()
        Create a new PositionedByteRange lacking a backing array and with an undefined viewport.
      • DynamicPositionedMutableByteRange

        public DynamicPositionedMutableByteRange​(int capacity)
        Create a new PositionedByteRange over a new backing array of size capacity. The range's offset and length are 0 and capacity, respectively.
        Parameters:
        capacity - the size of the backing array.
      • DynamicPositionedMutableByteRange

        public DynamicPositionedMutableByteRange​(byte[] bytes)
        Create a new PositionedByteRange over the provided bytes.
        Parameters:
        bytes - The array to wrap.
      • DynamicPositionedMutableByteRange

        public DynamicPositionedMutableByteRange​(byte[] bytes,
                                                 int offset,
                                                 int length)
        Create a new PositionedByteRange over the provided bytes.
        Parameters:
        bytes - The array to wrap.
        offset - The offset into bytes considered the beginning of this range.
        length - The length of this range.
    • Method Detail

      • unset

        public org.apache.hadoop.hbase.util.PositionedByteRange unset()
      • set

        public org.apache.hadoop.hbase.util.PositionedByteRange set​(int capacity)
        Specified by:
        set in interface org.apache.hadoop.hbase.util.ByteRange
        Specified by:
        set in interface org.apache.hadoop.hbase.util.PositionedByteRange
        Overrides:
        set in class org.apache.hadoop.hbase.util.AbstractPositionedByteRange
      • set

        public org.apache.hadoop.hbase.util.PositionedByteRange set​(byte[] bytes)
        Specified by:
        set in interface org.apache.hadoop.hbase.util.ByteRange
        Specified by:
        set in interface org.apache.hadoop.hbase.util.PositionedByteRange
        Overrides:
        set in class org.apache.hadoop.hbase.util.AbstractPositionedByteRange
      • set

        public org.apache.hadoop.hbase.util.PositionedByteRange set​(byte[] bytes,
                                                                    int offset,
                                                                    int length)
        Specified by:
        set in interface org.apache.hadoop.hbase.util.ByteRange
        Specified by:
        set in interface org.apache.hadoop.hbase.util.PositionedByteRange
        Overrides:
        set in class org.apache.hadoop.hbase.util.AbstractPositionedByteRange
      • setOffset

        public org.apache.hadoop.hbase.util.PositionedByteRange setOffset​(int offset)
        Update the beginning of this range. offset + length may not be greater than bytes.length. Resets position to 0.
        Specified by:
        setOffset in interface org.apache.hadoop.hbase.util.ByteRange
        Specified by:
        setOffset in interface org.apache.hadoop.hbase.util.PositionedByteRange
        Overrides:
        setOffset in class org.apache.hadoop.hbase.util.AbstractPositionedByteRange
        Parameters:
        offset - the new start of this range.
        Returns:
        this.
      • setLength

        public org.apache.hadoop.hbase.util.PositionedByteRange setLength​(int length)
        Update the length of this range. offset + length should not be greater than bytes.length. If position is greater than the new length, sets position to length.
        Specified by:
        setLength in interface org.apache.hadoop.hbase.util.ByteRange
        Specified by:
        setLength in interface org.apache.hadoop.hbase.util.PositionedByteRange
        Overrides:
        setLength in class org.apache.hadoop.hbase.util.AbstractPositionedByteRange
        Parameters:
        length - The new length of this range.
        Returns:
        this.
      • put

        public org.apache.hadoop.hbase.util.PositionedByteRange put​(byte val)
      • put

        public org.apache.hadoop.hbase.util.PositionedByteRange put​(byte[] val)
      • put

        public org.apache.hadoop.hbase.util.PositionedByteRange put​(byte[] val,
                                                                    int offset,
                                                                    int length)
      • get

        public org.apache.hadoop.hbase.util.PositionedByteRange get​(int index,
                                                                    byte[] dst)
        Specified by:
        get in interface org.apache.hadoop.hbase.util.ByteRange
        Specified by:
        get in interface org.apache.hadoop.hbase.util.PositionedByteRange
        Overrides:
        get in class org.apache.hadoop.hbase.util.AbstractPositionedByteRange
      • get

        public org.apache.hadoop.hbase.util.PositionedByteRange get​(int index,
                                                                    byte[] dst,
                                                                    int offset,
                                                                    int length)
        Specified by:
        get in interface org.apache.hadoop.hbase.util.ByteRange
        Specified by:
        get in interface org.apache.hadoop.hbase.util.PositionedByteRange
        Overrides:
        get in class org.apache.hadoop.hbase.util.AbstractPositionedByteRange
      • put

        public org.apache.hadoop.hbase.util.PositionedByteRange put​(int index,
                                                                    byte val)
      • put

        public org.apache.hadoop.hbase.util.PositionedByteRange put​(int index,
                                                                    byte[] val)
      • put

        public org.apache.hadoop.hbase.util.PositionedByteRange put​(int index,
                                                                    byte[] val,
                                                                    int offset,
                                                                    int length)
      • deepCopy

        public org.apache.hadoop.hbase.util.PositionedByteRange deepCopy()
      • shallowCopy

        public org.apache.hadoop.hbase.util.PositionedByteRange shallowCopy()
      • shallowCopySubRange

        public org.apache.hadoop.hbase.util.PositionedByteRange shallowCopySubRange​(int innerOffset,
                                                                                    int copyLength)
      • putShort

        public org.apache.hadoop.hbase.util.PositionedByteRange putShort​(short val)
      • putInt

        public org.apache.hadoop.hbase.util.PositionedByteRange putInt​(int val)
      • putLong

        public org.apache.hadoop.hbase.util.PositionedByteRange putLong​(long val)
      • putVLong

        public int putVLong​(long val)
      • putShort

        public org.apache.hadoop.hbase.util.PositionedByteRange putShort​(int index,
                                                                         short val)
      • putInt

        public org.apache.hadoop.hbase.util.PositionedByteRange putInt​(int index,
                                                                       int val)
      • putLong

        public org.apache.hadoop.hbase.util.PositionedByteRange putLong​(int index,
                                                                        long val)
      • putVLong

        public int putVLong​(int index,
                            long val)