org.apache.cassandra.db.composites

## Interface CellName

- All Superinterfaces:
    Composite, IMeasurableMemory
  All Known Implementing Classes:
    AbstractNativeCell, CompoundDenseCellName, CompoundSparseCellName, CompoundSparseCellName.WithCollection, NativeCell, NativeCounterCell, NativeDeletedCell, NativeExpiringCell, SimpleDenseCellName, SimpleSparseCellName, SimpleSparseInternedCellName

      public interface CellName
      extends Composite

  A CellName is a Composite, but for which, for the sake of CQL3, we distinguish different parts: a CellName has first a number of clustering components, followed by the CQL3 column name, and then possibly followed by a collection element part. The clustering prefix can itself be composed of multiple component. It can also be empty if the table has no clustering keys. In general, the CQL3 column name follows. However, some type of COMPACT STORAGE layout do not store the CQL3 column name in the cell name and so this part can be null (we call "dense" the cells whose name don't store the CQL3 column name). Lastly, if the cell is part of a CQL3 collection, we'll have a last component (a UUID for lists, an element for sets and a key for maps).

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.cassandra.db.composites.Composite

      `Composite.EOC`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `clusteringSize()` The number of clustering components.
    `java.nio.ByteBuffer` | `collectionElement()` The value of the collection element, or null if the cell is not part of a collection (i.e.
    `CellName` | `copy(CFMetaData cfm, AbstractAllocator allocator)`
    `ColumnIdentifier` | `cql3ColumnName(CFMetaData metadata)` The name of the CQL3 column this cell represents.
    `boolean` | `isCollectionCell()`
    `boolean` | `isSameCQL3RowAs(CellNameType type, CellName other)` Whether this cell is part of the same CQL3 row as the other cell.
    `long` | `unsharedHeapSizeExcludingData()`

    - ### Methods inherited from interface org.apache.cassandra.db.composites.Composite

      `dataSize, end, eoc, get, isEmpty, isPrefixOf, isStatic, size, slice, start, toByteBuffer, withEOC`

    - ### Methods inherited from interface org.apache.cassandra.cache.IMeasurableMemory

      `unsharedHeapSize`

- - ### Method Detail

    - #### clusteringSize

          int clusteringSize()

      The number of clustering components. It can be 0 if the table has no clustering columns, and it can be equal to size() if the table is dense() (in which case cql3ColumnName() will be null).

    - #### cql3ColumnName

          ColumnIdentifier cql3ColumnName(CFMetaData metadata)

      The name of the CQL3 column this cell represents. Will be null for cells of "dense" tables.
      Parameters:
        `metadata` -

    - #### collectionElement

          java.nio.ByteBuffer collectionElement()

      The value of the collection element, or null if the cell is not part of a collection (i.e. if !isCollectionCell()).

    - #### isCollectionCell

          boolean isCollectionCell()

    - #### isSameCQL3RowAs

          boolean isSameCQL3RowAs(CellNameType type,
                                  CellName other)

      Whether this cell is part of the same CQL3 row as the other cell.

    - #### copy

          CellName copy(CFMetaData cfm,
                        AbstractAllocator allocator)

      Specified by:
        `copy` in interface `Composite`

    - #### unsharedHeapSizeExcludingData

          long unsharedHeapSizeExcludingData()

Copyright © 2018 The Apache Software Foundation