CompoundSparseCellName (apache-cassandra API)
Date: 2014-10-21

org.apache.cassandra.db.composites

## Class CompoundSparseCellName

- java.lang.Object
- - org.apache.cassandra.db.composites.AbstractComposite
  - - org.apache.cassandra.db.composites.CompoundComposite
    - - org.apache.cassandra.db.composites.CompoundSparseCellName

- All Implemented Interfaces:
    IMeasurableMemory, CellName, Composite
  Direct Known Subclasses:
    CompoundSparseCellName.WithCollection

      public class CompoundSparseCellName
      extends CompoundComposite
      implements CellName

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `CompoundSparseCellName.WithCollection`

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

      `Composite.EOC`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ColumnIdentifier` | `columnName`

  - ### Method Summary

    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.
    `java.nio.ByteBuffer` | `get(int i)`
    `boolean` | `isCollectionCell()`
    `boolean` | `isSameCQL3RowAs(CellNameType type, CellName other)` Whether this cell is part of the same CQL3 row as the other cell.
    `int` | `size()`
    `long` | `unsharedHeapSize()`
    `long` | `unsharedHeapSizeExcludingData()`

    - ### Methods inherited from class org.apache.cassandra.db.composites.CompoundComposite

      `elementsCopy, isStatic`

    - ### Methods inherited from class org.apache.cassandra.db.composites.AbstractComposite

      `dataSize, end, eoc, equals, hashCode, isEmpty, isPrefixOf, slice, start, toByteBuffer, withEOC`

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

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

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

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

- - ### Field Detail

    - #### columnName

          protected final ColumnIdentifier columnName

  - ### Method Detail

    - #### unsharedHeapSize

          public long unsharedHeapSize()

      Specified by:
        `unsharedHeapSize` in interface `IMeasurableMemory`
      Overrides:
        `unsharedHeapSize` in class `CompoundComposite`
      Returns:
        the amount of on-heap memory retained by the object that might be reclaimed if the object were reclaimed, i.e. it should try to exclude globally cached data where possible, or counting portions of arrays that are referenced by the object but used by other objects only (e.g. slabbed byte-buffers), etc.

    - #### unsharedHeapSizeExcludingData

          public long unsharedHeapSizeExcludingData()

      Specified by:
        `unsharedHeapSizeExcludingData` in interface `CellName`
      Overrides:
        `unsharedHeapSizeExcludingData` in class `CompoundComposite`

    - #### size

          public int size()

      Specified by:
        `size` in interface `Composite`
      Overrides:
        `size` in class `CompoundComposite`

    - #### get

          public java.nio.ByteBuffer get(int i)

      Specified by:
        `get` in interface `Composite`
      Overrides:
        `get` in class `CompoundComposite`

    - #### clusteringSize

          public int clusteringSize()

      Description copied from interface: `CellName`
      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).
      Specified by:
        `clusteringSize` in interface `CellName`

    - #### cql3ColumnName

          public ColumnIdentifier cql3ColumnName(CFMetaData metadata)

      Description copied from interface: `CellName`
      The name of the CQL3 column this cell represents. Will be null for cells of "dense" tables.
      Specified by:
        `cql3ColumnName` in interface `CellName`

    - #### collectionElement

          public java.nio.ByteBuffer collectionElement()

      Description copied from interface: `CellName`
      The value of the collection element, or null if the cell is not part of a collection (i.e. if !isCollectionCell()).
      Specified by:
        `collectionElement` in interface `CellName`

    - #### isCollectionCell

          public boolean isCollectionCell()

      Specified by:
        `isCollectionCell` in interface `CellName`

    - #### isSameCQL3RowAs

          public boolean isSameCQL3RowAs(CellNameType type,
                                CellName other)

      Description copied from interface: `CellName`
      Whether this cell is part of the same CQL3 row as the other cell.
      Specified by:
        `isSameCQL3RowAs` in interface `CellName`

    - #### copy

          public CellName copy(CFMetaData cfm,
                      AbstractAllocator allocator)

      Specified by:
        `copy` in interface `CellName`
      Specified by:
        `copy` in interface `Composite`
      Overrides:
        `copy` in class `CompoundComposite`

Copyright © 2014 The Apache Software Foundation