org.apache.cassandra.db.filter

## Class ColumnCounter.GroupByPrefix

- java.lang.Object
- - org.apache.cassandra.db.filter.ColumnCounter
  - - org.apache.cassandra.db.filter.ColumnCounter.GroupByPrefix

- Direct Known Subclasses:
    ColumnCounter.GroupByPrefixReversed
  Enclosing class:
    ColumnCounter

      public static class ColumnCounter.GroupByPrefix
      extends ColumnCounter

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.cassandra.db.filter.ColumnCounter

      `ColumnCounter.GroupByPrefix, ColumnCounter.GroupByPrefixReversed`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected boolean` | `countPartitionsWithOnlyStaticData`
    `protected CellName` | `previous`
    `protected int` | `toGroup`
    `protected CellNameType` | `type`

    - ### Fields inherited from class org.apache.cassandra.db.filter.ColumnCounter

      `live, timestamp, tombstones`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GroupByPrefix(long timestamp, CellNameType type, int toGroup, boolean countPartitionsWithOnlyStaticData)` A column counter that count only 1 for all the columns sharing a given prefix of the key.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `count(Cell cell, DeletionInfo.InOrderTester tester)`

    - ### Methods inherited from class org.apache.cassandra.db.filter.ColumnCounter

      `countAll, getCellIterator, live, tombstones`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### type

          protected final CellNameType type

    - #### toGroup

          protected final int toGroup

    - #### countPartitionsWithOnlyStaticData

          protected final boolean countPartitionsWithOnlyStaticData

    - #### previous

          protected CellName previous

  - ### Constructor Detail

    - #### GroupByPrefix

          public GroupByPrefix(long timestamp,
                               CellNameType type,
                               int toGroup,
                               boolean countPartitionsWithOnlyStaticData)

      A column counter that count only 1 for all the columns sharing a given prefix of the key.
      Parameters:
        `type` - the type of the column name. This can be null if `toGroup` is 0, otherwise it should be a composite.
        `toGroup` - the number of composite components on which to group column. If 0, all columns are grouped, otherwise we group those for which the `toGroup` first component are equals.
        `countPartitionsWithOnlyStaticData` - if `true` the partitions with only static data should be counted as 1 valid row.

  - ### Method Detail

    - #### count

          public boolean count(Cell cell,
                               DeletionInfo.InOrderTester tester)

      Overrides:
        `count` in class `ColumnCounter`
      Returns:
        true if the cell counted as a live cell or a valid tombstone; false if it got immediately discarded for being shadowed by a range- or a partition tombstone

Copyright © 2018 The Apache Software Foundation