java.lang.Object
org.apache.hadoop.hbase.regionserver.querymatcher.ColumnCount

@Private class ColumnCount extends Object
Simple wrapper for a byte buffer and a counter. Does not copy.

NOT thread-safe because it is not used in a multi-threaded context, yet.

  • Field Details

    • bytes

      private final byte[] bytes
    • offset

      private final int offset
    • length

      private final int length
    • count

      private int count
  • Constructor Details

    • ColumnCount

      public ColumnCount(byte[] column)
      Constructor
      Parameters:
      column - the qualifier to count the versions for
    • ColumnCount

      public ColumnCount(byte[] column, int count)
      Constructor
      Parameters:
      column - the qualifier to count the versions for
      count - initial count
    • ColumnCount

      public ColumnCount(byte[] column, int offset, int length, int count)
      Constuctor
      Parameters:
      column - the qualifier to count the versions for
      offset - in the passed buffer where to start the qualifier from
      length - of the qualifier
      count - initial count
  • Method Details

    • getBuffer

      public byte[] getBuffer()
      Returns the buffer
    • getOffset

      public int getOffset()
      Returns the offset
    • getLength

      public int getLength()
      Returns the length
    • decrement

      public int decrement()
      Decrement the current version count
      Returns:
      current count
    • increment

      public int increment()
      Increment the current version count
      Returns:
      current count
    • setCount

      public void setCount(int count)
      Set the current count to a new count
      Parameters:
      count - new count to set